1
1
# coding: utf-8
2
2
3
- # (C) Copyright IBM Corp. 2024 .
3
+ # (C) Copyright IBM Corp. 2025 .
4
4
#
5
5
# Licensed under the Apache License, Version 2.0 (the "License");
6
6
# you may not use this file except in compliance with the License.
14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- # IBM OpenAPI SDK Code Generator Version: 3.96 .0-d6dec9d7-20241008-212902
17
+ # IBM OpenAPI SDK Code Generator Version: 3.102 .0-615ec964-20250307-203034
18
18
19
19
"""
20
20
Usage reports for IBM Cloud accounts
@@ -1461,6 +1461,12 @@ class InstanceUsage:
1461
1461
provisioned and rated.
1462
1462
:param str pricing_plan_id: (optional) The ID of the pricing plan used to rate
1463
1463
the usage.
1464
+ :param str subscription_id: (optional) The ID of service subscription with
1465
+ effective from timestamp.
1466
+ :param datetime created_at: (optional) The timestamp in RFC 3339 string format
1467
+ at which instance is created.
1468
+ :param datetime deleted_at: (optional) The timestamp in RFC 3339 string format
1469
+ at which instance is deleted.
1464
1470
:param str month: The month.
1465
1471
:param List[Metric] usage: All the resource used in the account.
1466
1472
:param bool pending: (optional) Pending charge from classic infrastructure.
@@ -1499,6 +1505,9 @@ def __init__(
1499
1505
parent_resource_instance_id : Optional [str ] = None ,
1500
1506
plan_name : Optional [str ] = None ,
1501
1507
pricing_plan_id : Optional [str ] = None ,
1508
+ subscription_id : Optional [str ] = None ,
1509
+ created_at : Optional [datetime ] = None ,
1510
+ deleted_at : Optional [datetime ] = None ,
1502
1511
pending : Optional [bool ] = None ,
1503
1512
currency_rate : Optional [float ] = None ,
1504
1513
tags : Optional [List [object ]] = None ,
@@ -1538,6 +1547,12 @@ def __init__(
1538
1547
was provisioned and rated.
1539
1548
:param str pricing_plan_id: (optional) The ID of the pricing plan used to
1540
1549
rate the usage.
1550
+ :param str subscription_id: (optional) The ID of service subscription with
1551
+ effective from timestamp.
1552
+ :param datetime created_at: (optional) The timestamp in RFC 3339 string
1553
+ format at which instance is created.
1554
+ :param datetime deleted_at: (optional) The timestamp in RFC 3339 string
1555
+ format at which instance is deleted.
1541
1556
:param bool pending: (optional) Pending charge from classic infrastructure.
1542
1557
:param float currency_rate: (optional) The value of the account's currency
1543
1558
in USD.
@@ -1568,6 +1583,9 @@ def __init__(
1568
1583
self .plan_id = plan_id
1569
1584
self .plan_name = plan_name
1570
1585
self .pricing_plan_id = pricing_plan_id
1586
+ self .subscription_id = subscription_id
1587
+ self .created_at = created_at
1588
+ self .deleted_at = deleted_at
1571
1589
self .month = month
1572
1590
self .usage = usage
1573
1591
self .pending = pending
@@ -1637,6 +1655,12 @@ def from_dict(cls, _dict: Dict) -> 'InstanceUsage':
1637
1655
args ['plan_name' ] = plan_name
1638
1656
if (pricing_plan_id := _dict .get ('pricing_plan_id' )) is not None :
1639
1657
args ['pricing_plan_id' ] = pricing_plan_id
1658
+ if (subscription_id := _dict .get ('subscription_id' )) is not None :
1659
+ args ['subscription_id' ] = subscription_id
1660
+ if (created_at := _dict .get ('created_at' )) is not None :
1661
+ args ['created_at' ] = string_to_datetime (created_at )
1662
+ if (deleted_at := _dict .get ('deleted_at' )) is not None :
1663
+ args ['deleted_at' ] = string_to_datetime (deleted_at )
1640
1664
if (month := _dict .get ('month' )) is not None :
1641
1665
args ['month' ] = month
1642
1666
else :
@@ -1707,6 +1731,12 @@ def to_dict(self) -> Dict:
1707
1731
_dict ['plan_name' ] = self .plan_name
1708
1732
if hasattr (self , 'pricing_plan_id' ) and self .pricing_plan_id is not None :
1709
1733
_dict ['pricing_plan_id' ] = self .pricing_plan_id
1734
+ if hasattr (self , 'subscription_id' ) and self .subscription_id is not None :
1735
+ _dict ['subscription_id' ] = self .subscription_id
1736
+ if hasattr (self , 'created_at' ) and self .created_at is not None :
1737
+ _dict ['created_at' ] = datetime_to_string (self .created_at )
1738
+ if hasattr (self , 'deleted_at' ) and self .deleted_at is not None :
1739
+ _dict ['deleted_at' ] = datetime_to_string (self .deleted_at )
1710
1740
if hasattr (self , 'month' ) and self .month is not None :
1711
1741
_dict ['month' ] = self .month
1712
1742
if hasattr (self , 'usage' ) and self .usage is not None :
@@ -2514,6 +2544,8 @@ class Plan:
2514
2544
:param bool billable: Indicates if the plan charges are billed to the customer.
2515
2545
:param float cost: The total cost incurred by the plan.
2516
2546
:param float rated_cost: Total pre-discounted cost incurred by the plan.
2547
+ :param str subscription_id: (optional) The ID of service subscription with
2548
+ effective from timestamp.
2517
2549
:param List[Metric] usage: All the metrics in the plan.
2518
2550
:param List[Discount] discounts: All the discounts applicable to the plan.
2519
2551
:param bool pending: (optional) Pending charge from classic infrastructure.
@@ -2531,6 +2563,7 @@ def __init__(
2531
2563
plan_name : Optional [str ] = None ,
2532
2564
pricing_region : Optional [str ] = None ,
2533
2565
pricing_plan_id : Optional [str ] = None ,
2566
+ subscription_id : Optional [str ] = None ,
2534
2567
pending : Optional [bool ] = None ,
2535
2568
) -> None :
2536
2569
"""
@@ -2547,6 +2580,8 @@ def __init__(
2547
2580
:param str pricing_region: (optional) The pricing region for the plan.
2548
2581
:param str pricing_plan_id: (optional) The ID of the pricing plan used to
2549
2582
rate the usage.
2583
+ :param str subscription_id: (optional) The ID of service subscription with
2584
+ effective from timestamp.
2550
2585
:param bool pending: (optional) Pending charge from classic infrastructure.
2551
2586
"""
2552
2587
self .plan_id = plan_id
@@ -2556,6 +2591,7 @@ def __init__(
2556
2591
self .billable = billable
2557
2592
self .cost = cost
2558
2593
self .rated_cost = rated_cost
2594
+ self .subscription_id = subscription_id
2559
2595
self .usage = usage
2560
2596
self .discounts = discounts
2561
2597
self .pending = pending
@@ -2586,6 +2622,8 @@ def from_dict(cls, _dict: Dict) -> 'Plan':
2586
2622
args ['rated_cost' ] = rated_cost
2587
2623
else :
2588
2624
raise ValueError ('Required property \' rated_cost\' not present in Plan JSON' )
2625
+ if (subscription_id := _dict .get ('subscription_id' )) is not None :
2626
+ args ['subscription_id' ] = subscription_id
2589
2627
if (usage := _dict .get ('usage' )) is not None :
2590
2628
args ['usage' ] = [Metric .from_dict (v ) for v in usage ]
2591
2629
else :
@@ -2620,6 +2658,8 @@ def to_dict(self) -> Dict:
2620
2658
_dict ['cost' ] = self .cost
2621
2659
if hasattr (self , 'rated_cost' ) and self .rated_cost is not None :
2622
2660
_dict ['rated_cost' ] = self .rated_cost
2661
+ if hasattr (self , 'subscription_id' ) and self .subscription_id is not None :
2662
+ _dict ['subscription_id' ] = self .subscription_id
2623
2663
if hasattr (self , 'usage' ) and self .usage is not None :
2624
2664
usage_list = []
2625
2665
for v in self .usage :
@@ -3025,9 +3065,9 @@ class SnapshotConfigHistoryItem:
3025
3065
"""
3026
3066
SnapshotConfigHistoryItem.
3027
3067
3028
- :param float start_time: (optional) Timestamp in milliseconds when the snapshot
3068
+ :param int start_time: (optional) Timestamp in milliseconds when the snapshot
3029
3069
configuration was created.
3030
- :param float end_time: (optional) Timestamp in milliseconds when the snapshot
3070
+ :param int end_time: (optional) Timestamp in milliseconds when the snapshot
3031
3071
configuration ends.
3032
3072
:param str updated_by: (optional) Account that updated the billing snapshot
3033
3073
configuration.
@@ -3057,8 +3097,8 @@ class SnapshotConfigHistoryItem:
3057
3097
def __init__ (
3058
3098
self ,
3059
3099
* ,
3060
- start_time : Optional [float ] = None ,
3061
- end_time : Optional [float ] = None ,
3100
+ start_time : Optional [int ] = None ,
3101
+ end_time : Optional [int ] = None ,
3062
3102
updated_by : Optional [str ] = None ,
3063
3103
account_id : Optional [str ] = None ,
3064
3104
state : Optional [str ] = None ,
@@ -3076,10 +3116,10 @@ def __init__(
3076
3116
"""
3077
3117
Initialize a SnapshotConfigHistoryItem object.
3078
3118
3079
- :param float start_time: (optional) Timestamp in milliseconds when the
3119
+ :param int start_time: (optional) Timestamp in milliseconds when the
3080
3120
snapshot configuration was created.
3081
- :param float end_time: (optional) Timestamp in milliseconds when the
3082
- snapshot configuration ends.
3121
+ :param int end_time: (optional) Timestamp in milliseconds when the snapshot
3122
+ configuration ends.
3083
3123
:param str updated_by: (optional) Account that updated the billing snapshot
3084
3124
configuration.
3085
3125
:param str account_id: (optional) Account ID for which billing report
@@ -3264,7 +3304,7 @@ class SnapshotList:
3264
3304
"""
3265
3305
List of billing reports snapshots.
3266
3306
3267
- :param float count: (optional) Number of total snapshots.
3307
+ :param int count: (optional) Number of total snapshots.
3268
3308
:param SnapshotListFirst first: (optional) Reference to the first page of the
3269
3309
search query.
3270
3310
:param SnapshotListNext next: (optional) Reference to the next page of the
@@ -3275,15 +3315,15 @@ class SnapshotList:
3275
3315
def __init__ (
3276
3316
self ,
3277
3317
* ,
3278
- count : Optional [float ] = None ,
3318
+ count : Optional [int ] = None ,
3279
3319
first : Optional ['SnapshotListFirst' ] = None ,
3280
3320
next : Optional ['SnapshotListNext' ] = None ,
3281
3321
snapshots : Optional [List ['SnapshotListSnapshotsItem' ]] = None ,
3282
3322
) -> None :
3283
3323
"""
3284
3324
Initialize a SnapshotList object.
3285
3325
3286
- :param float count: (optional) Number of total snapshots.
3326
+ :param int count: (optional) Number of total snapshots.
3287
3327
:param SnapshotListFirst first: (optional) Reference to the first page of
3288
3328
the search query.
3289
3329
:param SnapshotListNext next: (optional) Reference to the next page of the
@@ -3510,7 +3550,7 @@ class SnapshotListSnapshotsItem:
3510
3550
List of report types configured for the snapshot.
3511
3551
:param List[SnapshotListSnapshotsItemFilesItem] files: (optional) List of
3512
3552
location of reports.
3513
- :param float processed_at: (optional) Timestamp at which snapshot is captured.
3553
+ :param int processed_at: (optional) Timestamp at which snapshot is captured.
3514
3554
"""
3515
3555
3516
3556
def __init__ (
@@ -3979,9 +4019,9 @@ class SnapshotConfig:
3979
4019
snapshot of the billing reports.
3980
4020
:param str cos_location: (optional) Region of the COS instance.
3981
4021
:param str cos_endpoint: (optional) The endpoint of the COS instance.
3982
- :param float created_at: (optional) Timestamp in milliseconds when the snapshot
4022
+ :param int created_at: (optional) Timestamp in milliseconds when the snapshot
3983
4023
configuration was created.
3984
- :param float last_updated_at: (optional) Timestamp in milliseconds when the
4024
+ :param int last_updated_at: (optional) Timestamp in milliseconds when the
3985
4025
snapshot configuration was last updated.
3986
4026
:param List[SnapshotConfigHistoryItem] history: (optional) List of previous
3987
4027
versions of the snapshot configurations.
0 commit comments