xref: /aosp_15_r20/external/googleapis/google/cloud/discoveryengine/v1alpha/estimate_billing_service.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.discoveryengine.v1alpha;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/cloud/discoveryengine/v1alpha/import_config.proto";
24import "google/longrunning/operations.proto";
25import "google/protobuf/timestamp.proto";
26
27option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
28option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
29option java_multiple_files = true;
30option java_outer_classname = "EstimateBillingServiceProto";
31option java_package = "com.google.cloud.discoveryengine.v1alpha";
32option objc_class_prefix = "DISCOVERYENGINE";
33option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
34option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
35
36// Service for managing billing estimations resources.
37service EstimateBillingService {
38  option (google.api.default_host) = "discoveryengine.googleapis.com";
39  option (google.api.oauth_scopes) =
40      "https://www.googleapis.com/auth/cloud-platform";
41
42  // Estimates the data size to be used by a customer.
43  rpc EstimateDataSize(EstimateDataSizeRequest)
44      returns (google.longrunning.Operation) {
45    option (google.api.http) = {
46      post: "/v1alpha/{location=projects/*/locations/*}:estimateDataSize"
47      body: "*"
48    };
49    option (google.longrunning.operation_info) = {
50      response_type: "google.cloud.discoveryengine.v1alpha.EstimateDataSizeResponse"
51      metadata_type: "google.cloud.discoveryengine.v1alpha.EstimateDataSizeMetadata"
52    };
53  }
54}
55
56// Request message for
57// [EstimateBillingService.EstimateDataSize][google.cloud.discoveryengine.v1alpha.EstimateBillingService.EstimateDataSize]
58// method
59message EstimateDataSizeRequest {
60  // Data source is a set of website patterns that we crawl to get
61  // the total number of websites.
62  message WebsiteDataSource {
63    // URI patterns that we use to crawl.
64    message EstimatorUriPattern {
65      // User provided URI pattern. For example, `foo.com/bar/*`.
66      string provided_uri_pattern = 1;
67
68      // Whether we infer the generated URI or use the exact provided one.
69      bool exact_match = 2;
70
71      // Whether the pattern is exclusive or not. If set to true, the pattern is
72      // considered exclusive. If unset or set to false, the pattern is
73      // considered inclusive by default.
74      bool exclusive = 3;
75    }
76
77    // Required. The URI patterns to estimate the data sizes. At most 10
78    // patterns are allowed, otherwise an INVALID_ARGUMENT error is thrown.
79    repeated EstimatorUriPattern estimator_uri_patterns = 1
80        [(google.api.field_behavior) = REQUIRED];
81  }
82
83  // Data source contains files either in Cloud Storage or BigQuery.
84  message FileDataSource {
85    // Which source contains the files to be used.
86    oneof source {
87      // Cloud Storage location for the input content.
88      GcsSource gcs_source = 1;
89
90      // BigQuery input source.
91      BigQuerySource bigquery_source = 2;
92    }
93  }
94
95  // Data source for which we are estimating its size.
96  oneof data_source {
97    // Website data.
98    WebsiteDataSource website_data_source = 2;
99
100    // Structured or unstructured data.
101    FileDataSource file_data_source = 3;
102  }
103
104  // Required. Full resource name of the location, such as
105  // `projects/{project}/locations/{location}`.
106  string location = 1 [
107    (google.api.field_behavior) = REQUIRED,
108    (google.api.resource_reference) = {
109      type: "discoveryengine.googleapis.com/Location"
110    }
111  ];
112}
113
114// Response of the EstimateDataSize request. If the long running
115// operation was successful, then this message is returned by the
116// google.longrunning.Operations.response field if the operation was successful.
117message EstimateDataSizeResponse {
118  // Data size in terms of bytes.
119  int64 data_size_bytes = 1;
120
121  // Total number of documents.
122  int64 document_count = 2;
123}
124
125// Metadata related to the progress of the EstimateDataSize operation. This is
126// returned by the google.longrunning.Operation.metadata field.
127message EstimateDataSizeMetadata {
128  // Operation create time.
129  google.protobuf.Timestamp create_time = 1;
130}
131