aboutsummaryrefslogtreecommitdiff
path: root/google/cloud/talent/v4beta1/tenant_service.proto
blob: 5af4fd8c587eea2bef1d4ff0d23921241cd51d29 (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
// Copyright 2019 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.talent.v4beta1;

import "google/api/annotations.proto";
import "google/cloud/talent/v4beta1/common.proto";
import "google/cloud/talent/v4beta1/tenant.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
option java_multiple_files = true;
option java_outer_classname = "TenantServiceProto";
option java_package = "com.google.cloud.talent.v4beta1";
option objc_class_prefix = "CTS";

// A service that handles tenant management, including CRUD and enumeration.
service TenantService {
  // Creates a new tenant entity.
  rpc CreateTenant(CreateTenantRequest) returns (Tenant) {
    option (google.api.http) = {
      post: "/v4beta1/{parent=projects/*}/tenants"
      body: "*"
    };
  }

  // Retrieves specified tenant.
  rpc GetTenant(GetTenantRequest) returns (Tenant) {
    option (google.api.http) = {
      get: "/v4beta1/{name=projects/*/tenants/*}"
    };
  }

  // Updates specified tenant.
  rpc UpdateTenant(UpdateTenantRequest) returns (Tenant) {
    option (google.api.http) = {
      patch: "/v4beta1/{tenant.name=projects/*/tenants/*}"
      body: "*"
    };
  }

  // Deletes specified tenant.
  rpc DeleteTenant(DeleteTenantRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v4beta1/{name=projects/*/tenants/*}"
    };
  }

  // Lists all tenants associated with the project.
  rpc ListTenants(ListTenantsRequest) returns (ListTenantsResponse) {
    option (google.api.http) = {
      get: "/v4beta1/{parent=projects/*}/tenants"
    };
  }
}

// The Request of the CreateTenant method.
message CreateTenantRequest {
  // Required.
  //
  // Resource name of the project under which the tenant is created.
  //
  // The format is "projects/{project_id}", for example,
  // "projects/api-test-project".
  string parent = 1;

  // Required.
  //
  // The tenant to be created.
  Tenant tenant = 2;
}

// Request for getting a tenant by name.
message GetTenantRequest {
  // Required.
  //
  // The resource name of the tenant to be retrieved.
  //
  // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
  // "projects/api-test-project/tenants/foo".
  string name = 1;
}

// Request for updating a specified tenant.
message UpdateTenantRequest {
  // Required.
  //
  // The tenant resource to replace the current resource in the system.
  Tenant tenant = 1;

  // Optional but strongly recommended for the best service
  // experience.
  //
  // If [update_mask][google.cloud.talent.v4beta1.UpdateTenantRequest.update_mask] is provided, only the specified fields in
  // [tenant][google.cloud.talent.v4beta1.UpdateTenantRequest.tenant] are updated. Otherwise all the fields are updated.
  //
  // A field mask to specify the tenant fields to be updated. Only
  // top level fields of [Tenant][google.cloud.talent.v4beta1.Tenant] are supported.
  google.protobuf.FieldMask update_mask = 2;
}

// Request to delete a tenant.
message DeleteTenantRequest {
  // Required.
  //
  // The resource name of the tenant to be deleted.
  //
  // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
  // "projects/api-test-project/tenants/foo".
  string name = 1;
}

// List tenants for which the client has ACL visibility.
message ListTenantsRequest {
  // Required.
  //
  // Resource name of the project under which the tenant is created.
  //
  // The format is "projects/{project_id}", for example,
  // "projects/api-test-project".
  string parent = 1;

  // Optional.
  //
  // The starting indicator from which to return results.
  string page_token = 2;

  // Optional.
  //
  // The maximum number of tenants to be returned, at most 100.
  // Default is 100 if a non-positive number is provided.
  int32 page_size = 3;
}

// Output only.
//
// The List tenants response object.
message ListTenantsResponse {
  // Tenants for the current client.
  repeated Tenant tenants = 1;

  // A token to retrieve the next page of results.
  string next_page_token = 2;

  // Additional information for the API invocation, such as the request
  // tracking id.
  ResponseMetadata metadata = 3;
}