@@ -405,15 +405,17 @@ global___ListPipelineTriggerChartRecordsResponse = ListPipelineTriggerChartRecor
405
405
406
406
@typing_extensions .final
407
407
class CreditConsumptionChartRecord (google .protobuf .message .Message ):
408
- """CreditConsumptionChartRecord contains credit consumption metrics, aggregated
409
- by owner and time frame.
408
+ """CreditConsumptionChartRecord represents a timeline of Instill Credit
409
+ consumption. It contains a collection of (timestamp, amount) pairs that
410
+ represent the total credit consumption in a given time bucket.
410
411
"""
411
412
412
413
DESCRIPTOR : google .protobuf .descriptor .Descriptor
413
414
414
415
CREDIT_OWNER_FIELD_NUMBER : builtins .int
415
416
TIME_BUCKETS_FIELD_NUMBER : builtins .int
416
417
AMOUNT_FIELD_NUMBER : builtins .int
418
+ SOURCE_FIELD_NUMBER : builtins .int
417
419
credit_owner : builtins .str
418
420
"""Credit owner ID, e.g. `users/chef-wombat`."""
419
421
@property
@@ -422,21 +424,25 @@ class CreditConsumptionChartRecord(google.protobuf.message.Message):
422
424
@property
423
425
def amount (self ) -> google .protobuf .internal .containers .RepeatedScalarFieldContainer [builtins .float ]:
424
426
"""Total credit consumed in each time bucket."""
427
+ source : builtins .str
428
+ """Credit consumption source (e.g. "pipeline", "model")."""
425
429
def __init__ (
426
430
self ,
427
431
* ,
428
432
credit_owner : builtins .str = ...,
429
433
time_buckets : collections .abc .Iterable [google .protobuf .timestamp_pb2 .Timestamp ] | None = ...,
430
434
amount : collections .abc .Iterable [builtins .float ] | None = ...,
435
+ source : builtins .str = ...,
431
436
) -> None : ...
432
- def ClearField (self , field_name : typing_extensions .Literal ["amount" , b"amount" , "credit_owner" , b"credit_owner" , "time_buckets" , b"time_buckets" ]) -> None : ...
437
+ def ClearField (self , field_name : typing_extensions .Literal ["amount" , b"amount" , "credit_owner" , b"credit_owner" , "source" , b"source" , " time_buckets" , b"time_buckets" ]) -> None : ...
433
438
434
439
global___CreditConsumptionChartRecord = CreditConsumptionChartRecord
435
440
436
441
@typing_extensions .final
437
442
class ListCreditConsumptionChartRecordsRequest (google .protobuf .message .Message ):
438
- """ListCreditConsumptionChartRecordsRequest represents a request to list pipeline
439
- trigger metrics, aggregated by pipeline ID and time frame.
443
+ """ListCreditConsumptionChartRecordsRequest represents a request to list credit
444
+ consumption chart records for a given owner, grouped by time buckets and
445
+ consumption sources.
440
446
"""
441
447
442
448
DESCRIPTOR : google .protobuf .descriptor .Descriptor
@@ -457,10 +463,14 @@ class ListCreditConsumptionChartRecordsRequest(google.protobuf.message.Message):
457
463
"""
458
464
@property
459
465
def start (self ) -> google .protobuf .timestamp_pb2 .Timestamp :
460
- """Beginning of the time range from which the records will be fetched."""
466
+ """Beginning of the time range from which the records will be fetched.
467
+ The default value is the beginning of the current day, in UTC.
468
+ """
461
469
@property
462
470
def stop (self ) -> google .protobuf .timestamp_pb2 .Timestamp :
463
- """End of the time range from which the records will be fetched."""
471
+ """End of the time range from which the records will be fetched.
472
+ The default value is the current timestamp.
473
+ """
464
474
def __init__ (
465
475
self ,
466
476
* ,
@@ -482,25 +492,21 @@ global___ListCreditConsumptionChartRecordsRequest = ListCreditConsumptionChartRe
482
492
483
493
@typing_extensions .final
484
494
class ListCreditConsumptionChartRecordsResponse (google .protobuf .message .Message ):
485
- """ListCreditConsumptionChartRecordsResponse contains a list of pipeline trigger
495
+ """ListCreditConsumptionChartRecordsResponse contains a list of credit consumption
486
496
chart records.
487
497
"""
488
498
489
499
DESCRIPTOR : google .protobuf .descriptor .Descriptor
490
500
491
501
CREDIT_CONSUMPTION_CHART_RECORDS_FIELD_NUMBER : builtins .int
492
- TOTAL_AMOUNT_FIELD_NUMBER : builtins .int
493
502
@property
494
503
def credit_consumption_chart_records (self ) -> google .protobuf .internal .containers .RepeatedCompositeFieldContainer [global___CreditConsumptionChartRecord ]:
495
- """A list of pipeline trigger records."""
496
- total_amount : builtins .float
497
- """Sum of the total credit consumed within the time range."""
504
+ """Credit consumption timelines, aggregated by source."""
498
505
def __init__ (
499
506
self ,
500
507
* ,
501
508
credit_consumption_chart_records : collections .abc .Iterable [global___CreditConsumptionChartRecord ] | None = ...,
502
- total_amount : builtins .float = ...,
503
509
) -> None : ...
504
- def ClearField (self , field_name : typing_extensions .Literal ["credit_consumption_chart_records" , b"credit_consumption_chart_records" , "total_amount" , b"total_amount" ]) -> None : ...
510
+ def ClearField (self , field_name : typing_extensions .Literal ["credit_consumption_chart_records" , b"credit_consumption_chart_records" ]) -> None : ...
505
511
506
512
global___ListCreditConsumptionChartRecordsResponse = ListCreditConsumptionChartRecordsResponse
0 commit comments