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.baremetalsolution.v2; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/timestamp.proto"; 22 23option csharp_namespace = "Google.Cloud.BareMetalSolution.V2"; 24option go_package = "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb"; 25option java_multiple_files = true; 26option java_outer_classname = "LunProto"; 27option java_package = "com.google.cloud.baremetalsolution.v2"; 28option php_namespace = "Google\\Cloud\\BareMetalSolution\\V2"; 29option ruby_package = "Google::Cloud::BareMetalSolution::V2"; 30 31// A storage volume logical unit number (LUN). 32message Lun { 33 option (google.api.resource) = { 34 type: "baremetalsolution.googleapis.com/Lun" 35 pattern: "projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}" 36 }; 37 38 // The possible states for the LUN. 39 enum State { 40 // The LUN is in an unknown state. 41 STATE_UNSPECIFIED = 0; 42 43 // The LUN is being created. 44 CREATING = 1; 45 46 // The LUN is being updated. 47 UPDATING = 2; 48 49 // The LUN is ready for use. 50 READY = 3; 51 52 // The LUN has been requested to be deleted. 53 DELETING = 4; 54 55 // The LUN is in cool off state. It will be deleted after `expire_time`. 56 COOL_OFF = 5; 57 } 58 59 // Display the operating systems present for the LUN multiprotocol type. 60 enum MultiprotocolType { 61 // Server has no OS specified. 62 MULTIPROTOCOL_TYPE_UNSPECIFIED = 0; 63 64 // Server with Linux OS. 65 LINUX = 1; 66 } 67 68 // The storage types for a LUN. 69 enum StorageType { 70 // The storage type for this LUN is unknown. 71 STORAGE_TYPE_UNSPECIFIED = 0; 72 73 // This storage type for this LUN is SSD. 74 SSD = 1; 75 76 // This storage type for this LUN is HDD. 77 HDD = 2; 78 } 79 80 // Output only. The name of the LUN. 81 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 82 83 // An identifier for the LUN, generated by the backend. 84 string id = 10; 85 86 // The state of this storage volume. 87 State state = 2; 88 89 // The size of this LUN, in gigabytes. 90 int64 size_gb = 3; 91 92 // The LUN multiprotocol type ensures the characteristics of the LUN are 93 // optimized for each operating system. 94 MultiprotocolType multiprotocol_type = 4; 95 96 // Display the storage volume for this LUN. 97 string storage_volume = 5 [(google.api.resource_reference) = { 98 type: "baremetalsolution.googleapis.com/Volume" 99 }]; 100 101 // Display if this LUN can be shared between multiple physical servers. 102 bool shareable = 6; 103 104 // Display if this LUN is a boot LUN. 105 bool boot_lun = 7; 106 107 // The storage type for this LUN. 108 StorageType storage_type = 8; 109 110 // The WWID for this LUN. 111 string wwid = 9; 112 113 // Output only. Time after which LUN will be fully deleted. 114 // It is filled only for LUNs in COOL_OFF state. 115 google.protobuf.Timestamp expire_time = 11 116 [(google.api.field_behavior) = OUTPUT_ONLY]; 117 118 // Output only. Instances this Lun is attached to. 119 repeated string instances = 12 [ 120 (google.api.field_behavior) = OUTPUT_ONLY, 121 (google.api.resource_reference) = { 122 type: "baremetalsolution.googleapis.com/Instance" 123 } 124 ]; 125} 126 127// Message for requesting storage lun information. 128message GetLunRequest { 129 // Required. Name of the resource. 130 string name = 1 [ 131 (google.api.field_behavior) = REQUIRED, 132 (google.api.resource_reference) = { 133 type: "baremetalsolution.googleapis.com/Lun" 134 } 135 ]; 136} 137 138// Message for requesting a list of storage volume luns. 139message ListLunsRequest { 140 // Required. Parent value for ListLunsRequest. 141 string parent = 1 [ 142 (google.api.field_behavior) = REQUIRED, 143 (google.api.resource_reference) = { 144 type: "baremetalsolution.googleapis.com/Volume" 145 } 146 ]; 147 148 // Requested page size. The server might return fewer items than requested. 149 // If unspecified, server will pick an appropriate default. 150 int32 page_size = 2; 151 152 // A token identifying a page of results from the server. 153 string page_token = 3; 154} 155 156// Response message containing the list of storage volume luns. 157message ListLunsResponse { 158 // The list of luns. 159 repeated Lun luns = 1; 160 161 // A token identifying a page of results from the server. 162 string next_page_token = 2; 163 164 // Locations that could not be reached. 165 repeated string unreachable = 3; 166} 167 168// Request for skip lun cooloff and delete it. 169message EvictLunRequest { 170 // Required. The name of the lun. 171 string name = 1 [ 172 (google.api.field_behavior) = REQUIRED, 173 (google.api.resource_reference) = { 174 type: "baremetalsolution.googleapis.com/Lun" 175 } 176 ]; 177} 178