Skip to content

Commit d499846

Browse files
Google APIscopybara-github
authored andcommitted
build: restructure proto messages
PiperOrigin-RevId: 557476391
1 parent b4c238f commit d499846

4 files changed

Lines changed: 84 additions & 86 deletions

File tree

google/cloud/baremetalsolution/v2/baremetalsolution.proto

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package google.cloud.baremetalsolution.v2;
1818

1919
import "google/api/annotations.proto";
2020
import "google/api/client.proto";
21-
import "google/cloud/baremetalsolution/v2/common.proto";
21+
import "google/api/field_behavior.proto";
2222
import "google/cloud/baremetalsolution/v2/instance.proto";
2323
import "google/cloud/baremetalsolution/v2/lun.proto";
2424
import "google/cloud/baremetalsolution/v2/network.proto";
@@ -30,6 +30,7 @@ import "google/cloud/baremetalsolution/v2/volume.proto";
3030
import "google/cloud/baremetalsolution/v2/volume_snapshot.proto";
3131
import "google/longrunning/operations.proto";
3232
import "google/protobuf/empty.proto";
33+
import "google/protobuf/timestamp.proto";
3334

3435
option csharp_namespace = "Google.Cloud.BareMetalSolution.V2";
3536
option go_package = "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb";
@@ -527,3 +528,36 @@ service BareMetalSolution {
527528
option (google.api.method_signature) = "parent";
528529
}
529530
}
531+
532+
// Represents the metadata from a long-running operation.
533+
message OperationMetadata {
534+
// Output only. The time the operation was created.
535+
google.protobuf.Timestamp create_time = 1
536+
[(google.api.field_behavior) = OUTPUT_ONLY];
537+
538+
// Output only. The time the operation finished running.
539+
google.protobuf.Timestamp end_time = 2
540+
[(google.api.field_behavior) = OUTPUT_ONLY];
541+
542+
// Output only. Server-defined resource path for the target of the operation.
543+
string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
544+
545+
// Output only. Name of the action executed by the operation.
546+
string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
547+
548+
// Output only. Human-readable status of the operation, if any.
549+
string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
550+
551+
// Output only. Identifies whether the user requested the cancellation
552+
// of the operation. Operations that have been successfully cancelled
553+
// have [Operation.error][] value with a
554+
// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
555+
// `Code.CANCELLED`.
556+
bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
557+
558+
// Output only. API version used with the operation.
559+
string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
560+
}
561+
562+
// Response message from resetting a server.
563+
message ResetInstanceResponse {}

google/cloud/baremetalsolution/v2/common.proto

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ syntax = "proto3";
1616

1717
package google.cloud.baremetalsolution.v2;
1818

19-
import "google/api/field_behavior.proto";
20-
import "google/protobuf/timestamp.proto";
21-
2219
option csharp_namespace = "Google.Cloud.BareMetalSolution.V2";
2320
option go_package = "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb";
2421
option java_multiple_files = true;
@@ -27,36 +24,6 @@ option java_package = "com.google.cloud.baremetalsolution.v2";
2724
option php_namespace = "Google\\Cloud\\BareMetalSolution\\V2";
2825
option ruby_package = "Google::Cloud::BareMetalSolution::V2";
2926

30-
// Represents the metadata from a long-running operation.
31-
message OperationMetadata {
32-
// Output only. The time the operation was created.
33-
google.protobuf.Timestamp create_time = 1
34-
[(google.api.field_behavior) = OUTPUT_ONLY];
35-
36-
// Output only. The time the operation finished running.
37-
google.protobuf.Timestamp end_time = 2
38-
[(google.api.field_behavior) = OUTPUT_ONLY];
39-
40-
// Output only. Server-defined resource path for the target of the operation.
41-
string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
42-
43-
// Output only. Name of the action executed by the operation.
44-
string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
45-
46-
// Output only. Human-readable status of the operation, if any.
47-
string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
48-
49-
// Output only. Identifies whether the user requested the cancellation
50-
// of the operation. Operations that have been successfully cancelled
51-
// have [Operation.error][] value with a
52-
// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
53-
// `Code.CANCELLED`.
54-
bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
55-
56-
// Output only. API version used with the operation.
57-
string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
58-
}
59-
6027
// Performance tier of the Volume.
6128
enum VolumePerformanceTier {
6229
// Value is not specified.

google/cloud/baremetalsolution/v2/instance.proto

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,6 @@ message ResetInstanceRequest {
236236
];
237237
}
238238

239-
// Response message from resetting a server.
240-
message ResetInstanceResponse {}
241-
242239
// Message requesting to start a server.
243240
message StartInstanceRequest {
244241
// Required. Name of the resource.
@@ -316,3 +313,52 @@ message DetachLunRequest {
316313
// If true, performs lun unmapping without instance reboot.
317314
bool skip_reboot = 3;
318315
}
316+
317+
// Network template.
318+
message ServerNetworkTemplate {
319+
option (google.api.resource) = {
320+
type: "baremetalsolution.googleapis.com/ServerNetworkTemplate"
321+
pattern: "projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}"
322+
};
323+
324+
// Logical interface.
325+
message LogicalInterface {
326+
// Interface type.
327+
enum InterfaceType {
328+
// Unspecified value.
329+
INTERFACE_TYPE_UNSPECIFIED = 0;
330+
331+
// Bond interface type.
332+
BOND = 1;
333+
334+
// NIC interface type.
335+
NIC = 2;
336+
}
337+
338+
// Interface name.
339+
// This is not a globally unique identifier.
340+
// Name is unique only inside the ServerNetworkTemplate. This is of syntax
341+
// <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
342+
// and forms part of the network template name.
343+
string name = 1;
344+
345+
// Interface type.
346+
InterfaceType type = 2;
347+
348+
// If true, interface must have network connected.
349+
bool required = 3;
350+
}
351+
352+
// Output only. Template's unique name. The full resource name follows the
353+
// pattern:
354+
// `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
355+
// Generally, the {server_network_template} follows the syntax of
356+
// "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
357+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
358+
359+
// Instance types this template is applicable to.
360+
repeated string applicable_instance_types = 2;
361+
362+
// Logical interfaces.
363+
repeated LogicalInterface logical_interfaces = 3;
364+
}

google/cloud/baremetalsolution/v2/provisioning.proto

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -606,52 +606,3 @@ message UpdateProvisioningConfigRequest {
606606
// to.
607607
string email = 3 [(google.api.field_behavior) = OPTIONAL];
608608
}
609-
610-
// Network template.
611-
message ServerNetworkTemplate {
612-
option (google.api.resource) = {
613-
type: "baremetalsolution.googleapis.com/ServerNetworkTemplate"
614-
pattern: "projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}"
615-
};
616-
617-
// Logical interface.
618-
message LogicalInterface {
619-
// Interface type.
620-
enum InterfaceType {
621-
// Unspecified value.
622-
INTERFACE_TYPE_UNSPECIFIED = 0;
623-
624-
// Bond interface type.
625-
BOND = 1;
626-
627-
// NIC interface type.
628-
NIC = 2;
629-
}
630-
631-
// Interface name.
632-
// This is not a globally unique identifier.
633-
// Name is unique only inside the ServerNetworkTemplate. This is of syntax
634-
// <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
635-
// and forms part of the network template name.
636-
string name = 1;
637-
638-
// Interface type.
639-
InterfaceType type = 2;
640-
641-
// If true, interface must have network connected.
642-
bool required = 3;
643-
}
644-
645-
// Output only. Template's unique name. The full resource name follows the
646-
// pattern:
647-
// `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
648-
// Generally, the {server_network_template} follows the syntax of
649-
// "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
650-
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
651-
652-
// Instance types this template is applicable to.
653-
repeated string applicable_instance_types = 2;
654-
655-
// Logical interfaces.
656-
repeated LogicalInterface logical_interfaces = 3;
657-
}

0 commit comments

Comments
 (0)