1// Copyright 2023 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.notebooks.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/timestamp.proto"; 22 23option csharp_namespace = "Google.Cloud.Notebooks.V1"; 24option go_package = "cloud.google.com/go/notebooks/apiv1/notebookspb;notebookspb"; 25option java_multiple_files = true; 26option java_outer_classname = "EnvironmentProto"; 27option java_package = "com.google.cloud.notebooks.v1"; 28option php_namespace = "Google\\Cloud\\Notebooks\\V1"; 29option ruby_package = "Google::Cloud::Notebooks::V1"; 30 31// Definition of a software environment that is used to start a notebook 32// instance. 33message Environment { 34 option (google.api.resource) = { 35 type: "notebooks.googleapis.com/Environment" 36 pattern: "projects/{project}/environments/{environment}" 37 }; 38 39 // Output only. Name of this environment. 40 // Format: 41 // `projects/{project_id}/locations/{location}/environments/{environment_id}` 42 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 43 44 // Display name of this environment for the UI. 45 string display_name = 2; 46 47 // A brief description of this environment. 48 string description = 3; 49 50 // Type of the environment; can be one of VM image, or container image. 51 oneof image_type { 52 // Use a Compute Engine VM image to start the notebook instance. 53 VmImage vm_image = 6; 54 55 // Use a container image to start the notebook instance. 56 ContainerImage container_image = 7; 57 } 58 59 // Path to a Bash script that automatically runs after a notebook instance 60 // fully boots up. The path must be a URL or 61 // Cloud Storage path. Example: `"gs://path-to-file/file-name"` 62 string post_startup_script = 8; 63 64 // Output only. The time at which this environment was created. 65 google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 66} 67 68// Definition of a custom Compute Engine virtual machine image for starting a 69// notebook instance with the environment installed directly on the VM. 70message VmImage { 71 // Required. The name of the Google Cloud project that this VM image belongs to. 72 // Format: `{project_id}` 73 string project = 1 [(google.api.field_behavior) = REQUIRED]; 74 75 // The reference to an external Compute Engine VM image. 76 oneof image { 77 // Use VM image name to find the image. 78 string image_name = 2; 79 80 // Use this VM image family to find the image; the newest image in this 81 // family will be used. 82 string image_family = 3; 83 } 84} 85 86// Definition of a container image for starting a notebook instance with the 87// environment installed in a container. 88message ContainerImage { 89 // Required. The path to the container image repository. For example: 90 // `gcr.io/{project_id}/{image_name}` 91 string repository = 1 [(google.api.field_behavior) = REQUIRED]; 92 93 // The tag of the container image. If not specified, this defaults 94 // to the latest tag. 95 string tag = 2; 96} 97