@@ -17,13 +17,15 @@ syntax = "proto3";
17
17
18
18
package google.cloud.bigquery.v2 ;
19
19
20
+ import "google/api/client.proto" ;
21
+ import "google/api/field_behavior.proto" ;
22
+ import "google/cloud/bigquery/v2/encryption_config.proto" ;
20
23
import "google/cloud/bigquery/v2/model_reference.proto" ;
21
24
import "google/cloud/bigquery/v2/standard_sql.proto" ;
22
25
import "google/protobuf/empty.proto" ;
23
26
import "google/protobuf/timestamp.proto" ;
24
27
import "google/protobuf/wrappers.proto" ;
25
28
import "google/api/annotations.proto" ;
26
- import "google/api/client.proto" ;
27
29
28
30
option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/v2;bigquery" ;
29
31
option java_outer_classname = "ModelProto" ;
@@ -39,19 +41,23 @@ service ModelService {
39
41
40
42
// Gets the specified model resource by model ID.
41
43
rpc GetModel (GetModelRequest ) returns (Model ) {
44
+ option (google.api.method_signature ) = "project_id,dataset_id,model_id" ;
42
45
}
43
46
44
47
// Lists all models in the specified dataset. Requires the READER dataset
45
48
// role.
46
49
rpc ListModels (ListModelsRequest ) returns (ListModelsResponse ) {
50
+ option (google.api.method_signature ) = "project_id,dataset_id,max_results" ;
47
51
}
48
52
49
53
// Patch specific fields in the specified model.
50
54
rpc PatchModel (PatchModelRequest ) returns (Model ) {
55
+ option (google.api.method_signature ) = "project_id,dataset_id,model_id,model" ;
51
56
}
52
57
53
58
// Deletes the model specified by modelId from the dataset.
54
59
rpc DeleteModel (DeleteModelRequest ) returns (google .protobuf .Empty ) {
60
+ option (google.api.method_signature ) = "project_id,dataset_id,model_id" ;
55
61
}
56
62
}
57
63
@@ -236,7 +242,7 @@ message Model {
236
242
237
243
// Counts of all categories for the categorical feature. If there are
238
244
// more than ten categories, we return top ten (by count) and return
239
- // one more CategoryCount with category ‘ _OTHER_’ and count as
245
+ // one more CategoryCount with category " _OTHER_" and count as
240
246
// aggregate counts of remaining categories.
241
247
repeated CategoryCount category_counts = 1 ;
242
248
}
@@ -514,103 +520,105 @@ message Model {
514
520
}
515
521
516
522
// Output only. A hash of this resource.
517
- string etag = 1 ;
523
+ string etag = 1 [ (google.api .field_behavior ) = OUTPUT_ONLY ] ;
518
524
519
525
// Required. Unique identifier for this model.
520
- ModelReference model_reference = 2 ;
526
+ ModelReference model_reference = 2 [ (google.api .field_behavior ) = REQUIRED ] ;
521
527
522
- // Output only. The time when this model was created, in millisecs since the
523
- // epoch.
524
- int64 creation_time = 5 ;
528
+ // Output only. The time when this model was created, in millisecs since the epoch.
529
+ int64 creation_time = 5 [(google.api.field_behavior ) = OUTPUT_ONLY ];
525
530
526
- // Output only. The time when this model was last modified, in millisecs
527
- // since the epoch.
528
- int64 last_modified_time = 6 ;
531
+ // Output only. The time when this model was last modified, in millisecs since the epoch.
532
+ int64 last_modified_time = 6 [(google.api.field_behavior ) = OUTPUT_ONLY ];
529
533
530
- // [ Optional] A user-friendly description of this model.
531
- string description = 12 ;
534
+ // Optional. A user-friendly description of this model.
535
+ string description = 12 [ (google.api .field_behavior ) = OPTIONAL ] ;
532
536
533
- // [ Optional] A descriptive name for this model.
534
- string friendly_name = 14 ;
537
+ // Optional. A descriptive name for this model.
538
+ string friendly_name = 14 [ (google.api .field_behavior ) = OPTIONAL ] ;
535
539
536
- // [Optional] The labels associated with this model. You can use these to
537
- // organize and group your models. Label keys and values can be no longer
540
+ // The labels associated with this model. You can use these to organize
541
+ // and group your models. Label keys and values can be no longer
538
542
// than 63 characters, can only contain lowercase letters, numeric
539
543
// characters, underscores and dashes. International characters are allowed.
540
544
// Label values are optional. Label keys must start with a letter and each
541
545
// label in the list must have a different key.
542
546
map <string , string > labels = 15 ;
543
547
544
- // [ Optional] The time when this model expires, in milliseconds since the
545
- // epoch. If not present, the model will persist indefinitely. Expired models
548
+ // Optional. The time when this model expires, in milliseconds since the epoch.
549
+ // If not present, the model will persist indefinitely. Expired models
546
550
// will be deleted and their storage reclaimed. The defaultTableExpirationMs
547
551
// property of the encapsulating dataset can be used to set a default
548
552
// expirationTime on newly created models.
549
- int64 expiration_time = 16 ;
553
+ int64 expiration_time = 16 [ (google.api .field_behavior ) = OPTIONAL ] ;
550
554
551
555
// Output only. The geographic location where the model resides. This value
552
556
// is inherited from the dataset.
553
- string location = 13 ;
557
+ string location = 13 [(google.api.field_behavior ) = OUTPUT_ONLY ];
558
+
559
+ // Custom encryption configuration (e.g., Cloud KMS keys). This shows the
560
+ // encryption configuration of the model data while stored in BigQuery
561
+ // storage.
562
+ google.cloud.bigquery.v2.EncryptionConfiguration encryption_configuration = 17 ;
554
563
555
564
// Output only. Type of the model resource.
556
- ModelType model_type = 7 ;
565
+ ModelType model_type = 7 [ (google.api .field_behavior ) = OUTPUT_ONLY ] ;
557
566
558
- // Output only. Information for all training runs in increasing order of
559
- // start_time.
560
- repeated TrainingRun training_runs = 9 ;
567
+ // Output only. Information for all training runs in increasing order of start_time.
568
+ repeated TrainingRun training_runs = 9 [(google.api.field_behavior ) = OUTPUT_ONLY ];
561
569
562
570
// Output only. Input feature columns that were used to train this model.
563
- repeated StandardSqlField feature_columns = 10 ;
571
+ repeated StandardSqlField feature_columns = 10 [ (google.api .field_behavior ) = OUTPUT_ONLY ] ;
564
572
565
573
// Output only. Label columns that were used to train this model.
566
574
// The output of the model will have a "predicted_" prefix to these columns.
567
- repeated StandardSqlField label_columns = 11 ;
575
+ repeated StandardSqlField label_columns = 11 [ (google.api .field_behavior ) = OUTPUT_ONLY ] ;
568
576
}
569
577
570
578
message GetModelRequest {
571
- // Project ID of the requested model.
572
- string project_id = 1 ;
579
+ // Required. Project ID of the requested model.
580
+ string project_id = 1 [ (google.api .field_behavior ) = REQUIRED ] ;
573
581
574
- // Dataset ID of the requested model.
575
- string dataset_id = 2 ;
582
+ // Required. Dataset ID of the requested model.
583
+ string dataset_id = 2 [ (google.api .field_behavior ) = REQUIRED ] ;
576
584
577
- // Model ID of the requested model.
578
- string model_id = 3 ;
585
+ // Required. Model ID of the requested model.
586
+ string model_id = 3 [ (google.api .field_behavior ) = REQUIRED ] ;
579
587
}
580
588
581
589
message PatchModelRequest {
582
- // Project ID of the model to patch.
583
- string project_id = 1 ;
590
+ // Required. Project ID of the model to patch.
591
+ string project_id = 1 [ (google.api .field_behavior ) = REQUIRED ] ;
584
592
585
- // Dataset ID of the model to patch.
586
- string dataset_id = 2 ;
593
+ // Required. Dataset ID of the model to patch.
594
+ string dataset_id = 2 [ (google.api .field_behavior ) = REQUIRED ] ;
587
595
588
- // Model ID of the model to patch.
589
- string model_id = 3 ;
596
+ // Required. Model ID of the model to patch.
597
+ string model_id = 3 [ (google.api .field_behavior ) = REQUIRED ] ;
590
598
591
- // Patched model.
599
+ // Required. Patched model.
592
600
// Follows RFC5789 patch semantics. Missing fields are not updated.
593
601
// To clear a field, explicitly set to default value.
594
- Model model = 4 ;
602
+ Model model = 4 [ (google.api .field_behavior ) = REQUIRED ] ;
595
603
}
596
604
597
605
message DeleteModelRequest {
598
- // Project ID of the model to delete.
599
- string project_id = 1 ;
606
+ // Required. Project ID of the model to delete.
607
+ string project_id = 1 [ (google.api .field_behavior ) = REQUIRED ] ;
600
608
601
- // Dataset ID of the model to delete.
602
- string dataset_id = 2 ;
609
+ // Required. Dataset ID of the model to delete.
610
+ string dataset_id = 2 [ (google.api .field_behavior ) = REQUIRED ] ;
603
611
604
- // Model ID of the model to delete.
605
- string model_id = 3 ;
612
+ // Required. Model ID of the model to delete.
613
+ string model_id = 3 [ (google.api .field_behavior ) = REQUIRED ] ;
606
614
}
607
615
608
616
message ListModelsRequest {
609
- // Project ID of the models to list.
610
- string project_id = 1 ;
617
+ // Required. Project ID of the models to list.
618
+ string project_id = 1 [ (google.api .field_behavior ) = REQUIRED ] ;
611
619
612
- // Dataset ID of the models to list.
613
- string dataset_id = 2 ;
620
+ // Required. Dataset ID of the models to list.
621
+ string dataset_id = 2 [ (google.api .field_behavior ) = REQUIRED ] ;
614
622
615
623
// The maximum number of results to return in a single response page.
616
624
// Leverage the page tokens to iterate through the entire collection.
0 commit comments