Skip to content

Commit

Permalink
chore: reformatted the protos
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 494247971
  • Loading branch information
Google APIs authored and copybara-github committed Dec 9, 2022
1 parent e69c47f commit f7f4993
Show file tree
Hide file tree
Showing 6 changed files with 425 additions and 444 deletions.
84 changes: 50 additions & 34 deletions google/cloud/dataplex/v1/analyze.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ message Environment {
// Optional. Size in GB of the disk. Default is 100 GB.
int32 disk_size_gb = 1 [(google.api.field_behavior) = OPTIONAL];

// Optional. Total number of nodes in the sessions created for this environment.
// Optional. Total number of nodes in the sessions created for this
// environment.
int32 node_count = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. Max configurable nodes.
Expand All @@ -58,18 +59,21 @@ message Environment {
// Optional. List of Java jars to be included in the runtime environment.
// Valid input includes Cloud Storage URIs to Jar binaries.
// For example, gs://bucket-name/my/path/to/file.jar
repeated string java_libraries = 2 [(google.api.field_behavior) = OPTIONAL];
repeated string java_libraries = 2
[(google.api.field_behavior) = OPTIONAL];

// Optional. A list of python packages to be installed.
// Valid formats include Cloud Storage URI to a PIP installable library.
// For example, gs://bucket-name/my/path/to/lib.tar.gz
repeated string python_packages = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. Spark properties to provide configuration for use in sessions created
// for this environment. The properties to set on daemon config files.
// Property keys are specified in `prefix:property` format.
// The prefix must be "spark".
map<string, string> properties = 4 [(google.api.field_behavior) = OPTIONAL];
repeated string python_packages = 3
[(google.api.field_behavior) = OPTIONAL];

// Optional. Spark properties to provide configuration for use in sessions
// created for this environment. The properties to set on daemon config
// files. Property keys are specified in `prefix:property` format. The
// prefix must be "spark".
map<string, string> properties = 4
[(google.api.field_behavior) = OPTIONAL];
}

// Hardware config
Expand All @@ -80,27 +84,29 @@ message Environment {

// Software config
oneof runtime {
// Required. Software Runtime Configuration for analyze interactive workloads.
// Required. Software Runtime Configuration for analyze interactive
// workloads.
OsImageRuntime os_image = 100 [(google.api.field_behavior) = REQUIRED];
}
}

message SessionSpec {
// Optional. The idle time configuration of the session. The session will be
// auto-terminated at the end of this period.
google.protobuf.Duration max_idle_duration = 1 [(google.api.field_behavior) = OPTIONAL];

// Optional. If True, this causes sessions to be pre-created and available for faster
// startup to enable interactive exploration use-cases. This defaults to
// False to avoid additional billed charges.
// These can only be set to True for the environment with name set to
// "default", and with default configuration.
google.protobuf.Duration max_idle_duration = 1
[(google.api.field_behavior) = OPTIONAL];

// Optional. If True, this causes sessions to be pre-created and available
// for faster startup to enable interactive exploration use-cases. This
// defaults to False to avoid additional billed charges. These can only be
// set to True for the environment with name set to "default", and with
// default configuration.
bool enable_fast_startup = 2 [(google.api.field_behavior) = OPTIONAL];
}

message SessionStatus {
// Output only. Queries over sessions to mark whether the environment is currently
// active or not
// Output only. Queries over sessions to mark whether the environment is
// currently active or not
bool active = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}

Expand All @@ -124,15 +130,18 @@ message Environment {
// Optional. User friendly display name.
string display_name = 2 [(google.api.field_behavior) = OPTIONAL];

// Output only. System generated globally unique ID for the environment. This ID will be
// different if the environment is deleted and re-created with the same name.
// Output only. System generated globally unique ID for the environment. This
// ID will be different if the environment is deleted and re-created with the
// same name.
string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Environment creation time.
google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 4
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The time when the environment was last updated.
google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp update_time = 5
[(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. User defined labels for the environment.
map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL];
Expand All @@ -144,15 +153,18 @@ message Environment {
State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];

// Required. Infrastructure specification for the Environment.
InfrastructureSpec infrastructure_spec = 100 [(google.api.field_behavior) = REQUIRED];
InfrastructureSpec infrastructure_spec = 100
[(google.api.field_behavior) = REQUIRED];

// Optional. Configuration for sessions created for this environment.
SessionSpec session_spec = 101 [(google.api.field_behavior) = OPTIONAL];

// Output only. Status of sessions created for this environment.
SessionStatus session_status = 102 [(google.api.field_behavior) = OUTPUT_ONLY];
SessionStatus session_status = 102
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. URI Endpoints to access sessions associated with the Environment.
// Output only. URI Endpoints to access sessions associated with the
// Environment.
Endpoints endpoints = 200 [(google.api.field_behavior) = OUTPUT_ONLY];
}

Expand Down Expand Up @@ -202,20 +214,23 @@ message Content {
}
];

// Output only. System generated globally unique ID for the content. This ID will be
// different if the content is deleted and re-created with the same name.
// Output only. System generated globally unique ID for the content. This ID
// will be different if the content is deleted and re-created with the same
// name.
string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Required. The path for the Content file, represented as directory structure.
// Unique within a lake.
// Limited to alphanumerics, hyphens, underscores, dots and slashes.
// Required. The path for the Content file, represented as directory
// structure. Unique within a lake. Limited to alphanumerics, hyphens,
// underscores, dots and slashes.
string path = 3 [(google.api.field_behavior) = REQUIRED];

// Output only. Content creation time.
google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 4
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The time when the content was last updated.
google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp update_time = 5
[(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. User defined labels for the content.
map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL];
Expand Down Expand Up @@ -258,7 +273,8 @@ message Session {
string user_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Session start time.
google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 3
[(google.api.field_behavior) = OUTPUT_ONLY];

State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}
31 changes: 16 additions & 15 deletions google/cloud/dataplex/v1/content.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ option java_package = "com.google.cloud.dataplex.v1";
// ContentService manages Notebook and SQL Scripts for Dataplex.
service ContentService {
option (google.api.default_host) = "dataplex.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// Create a content.
rpc CreateContent(CreateContentRequest) returns (Content) {
Expand Down Expand Up @@ -90,7 +91,8 @@ service ContentService {
//
// Caller must have Google IAM `dataplex.content.getIamPolicy` permission
// on the resource.
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
returns (google.iam.v1.Policy) {
option (google.api.http) = {
get: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy"
additional_bindings {
Expand All @@ -105,7 +107,8 @@ service ContentService {
//
// Caller must have Google IAM `dataplex.content.setIamPolicy` permission
// on the resource.
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy"
body: "*"
Expand All @@ -126,7 +129,8 @@ service ContentService {
// Note: This operation is designed to be used for building permission-aware
// UIs and command-line tools, not for authorization checking. This operation
// may "fail open" without warning.
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
returns (google.iam.v1.TestIamPermissionsResponse) {
option (google.api.http) = {
post: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions"
body: "*"
Expand Down Expand Up @@ -155,9 +159,7 @@ message CreateContentRequest {
// projects/{project_id}/locations/{location_id}/lakes/{lake_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dataplex.googleapis.com/Lake"
}
(google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
];

// Required. Content resource.
Expand All @@ -171,7 +173,8 @@ message CreateContentRequest {
// Update content request.
message UpdateContentRequest {
// Required. Mask of fields to update.
google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];
google.protobuf.FieldMask update_mask = 1
[(google.api.field_behavior) = REQUIRED];

// Required. Update description.
// Only fields specified in `update_mask` are updated.
Expand Down Expand Up @@ -200,18 +203,16 @@ message ListContentRequest {
// projects/{project_id}/locations/{location_id}/lakes/{lake_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dataplex.googleapis.com/Lake"
}
(google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
];

// Optional. Maximum number of content to return. The service may return fewer than
// this value. If unspecified, at most 10 content will be returned. The
// Optional. Maximum number of content to return. The service may return fewer
// than this value. If unspecified, at most 10 content will be returned. The
// maximum value is 1000; values above 1000 will be coerced to 1000.
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. Page token received from a previous `ListContent` call. Provide this
// to retrieve the subsequent page. When paginating, all other parameters
// Optional. Page token received from a previous `ListContent` call. Provide
// this to retrieve the subsequent page. When paginating, all other parameters
// provided to `ListContent` must match the call that provided the page
// token.
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
Expand Down
Loading

0 comments on commit f7f4993

Please sign in to comment.