summaryrefslogtreecommitdiff
path: root/third_party/googleapis/google/cloud/baremetalsolution/v2/nfs_share.proto
blob: 29d2a808dddf63375d5b59290dab2851dbdeda79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.baremetalsolution.v2;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/field_mask.proto";

option csharp_namespace = "Google.Cloud.BareMetalSolution.V2";
option go_package = "google.golang.org/genproto/googleapis/cloud/baremetalsolution/v2;baremetalsolution";
option java_multiple_files = true;
option java_outer_classname = "NfsShareProto";
option java_package = "com.google.cloud.baremetalsolution.v2";
option php_namespace = "Google\\Cloud\\BareMetalSolution\\V2";
option ruby_package = "Google::Cloud::BareMetalSolution::V2";

// An NFS share.
message NfsShare {
  option (google.api.resource) = {
    type: "baremetalsolution.googleapis.com/NFSShare"
    pattern: "projects/{project}/locations/{location}/nfsShares/{nfs_share}"
  };

  // The possible states for this NFS share.
  enum State {
    // The share is in an unknown state.
    STATE_UNSPECIFIED = 0;

    // The share has been provisioned.
    PROVISIONED = 1;
  }

  // The possible mount permissions.
  enum MountPermissions {
    // Permissions were not specified.
    MOUNT_PERMISSIONS_UNSPECIFIED = 0;

    // NFS share can be mount with read-only permissions.
    READ = 1;

    // NFS share can be mount with read-write permissions.
    READ_WRITE = 2;
  }

  // Represents an 'access point' for the share.
  message AllowedClient {
    // The network the access point sits on.
    string network = 1 [(google.api.resource_reference) = {
                          type: "baremetalsolution.googleapis.com/Network"
                        }];

    // The IP address of the share on this network.
    string share_ip = 2;

    // The subnet of IP addresses permitted to access the share.
    string allowed_clients_cidr = 3;

    // Mount permissions.
    MountPermissions mount_permissions = 4;

    // Allow dev flag.  Which controls whether to allow creation of devices.
    bool allow_dev = 5;

    // Allow the setuid flag.
    bool allow_suid = 6;

    // Disable root squashing, which is a feature of NFS.
    // Root squash is a special mapping of the remote superuser (root) identity
    // when using identity authentication.
    bool no_root_squash = 7;
  }

  // Output only. The name of the NFS share.
  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. An identifier for the NFS share, generated by the backend.
  string nfs_share_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // The state of the NFS share.
  State state = 3;

  // The volume containing the share.
  string volume = 4 [(google.api.resource_reference) = {
                       type: "baremetalsolution.googleapis.com/Volume"
                     }];

  // List of allowed access points.
  repeated AllowedClient allowed_clients = 5;

  // Labels as key value pairs.
  map<string, string> labels = 6;
}

// Message for requesting NFS share information.
message GetNfsShareRequest {
  // Required. Name of the resource.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "baremetalsolution.googleapis.com/NFSShare"
    }
  ];
}

// Message for requesting a list of NFS shares.
message ListNfsSharesRequest {
  // Required. Parent value for ListNfsSharesRequest.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "locations.googleapis.com/Location"
    }
  ];

  // Requested page size. The server might return fewer items than requested.
  // If unspecified, server will pick an appropriate default.
  int32 page_size = 2;

  // A token identifying a page of results from the server.
  string page_token = 3;

  // List filter.
  string filter = 4;
}

// Response message containing the list of NFS shares.
message ListNfsSharesResponse {
  // The list of NFS shares.
  repeated NfsShare nfs_shares = 1;

  // A token identifying a page of results from the server.
  string next_page_token = 2;

  // Locations that could not be reached.
  repeated string unreachable = 3;
}

// Message requesting to updating a NFS share.
message UpdateNfsShareRequest {
  // Required. The NFS share to update.
  //
  // The `name` field is used to identify the NFS share to update.
  // Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
  NfsShare nfs_share = 1 [(google.api.field_behavior) = REQUIRED];

  // The list of fields to update.
  // The only currently supported fields are:
  //   `labels`
  google.protobuf.FieldMask update_mask = 2;
}