Skip to content

Commit 4f26eca

Browse files
authored
COMP-619 - Update Platform SDK for new Delete method (#33)
1 parent 9e2aa0d commit 4f26eca

File tree

12 files changed

+1540
-108
lines changed

12 files changed

+1540
-108
lines changed

WORKSPACE

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ git_repository(
6161
git_repository(
6262
name = "improbable_platform",
6363
remote = "[email protected]:improbable/platform.git",
64-
commit = "777672f36dbc103621ee04dec1786da2cdd48599",
65-
shallow_since = "2019-02-01",
64+
commit = "e0315520c25f65716ca119d85fc76a967916101c",
65+
shallow_since = "2019-04-01",
6666
)
6767

6868
new_git_repository(
@@ -86,6 +86,22 @@ new_git_repository(
8686
strip_prefix = "src",
8787
)
8888

89+
new_git_repository(
90+
name = "improbable_protoc_gen_gocli",
91+
commit = "7d7a36b1ec7123d2af3105fe3a3692f8e56880f2",
92+
remote = "[email protected]:improbable/protoc-gen-gocli.git",
93+
build_file = "@//third_party/protoc_gen_gocli:BUILD",
94+
strip_prefix = "bazel_proto",
95+
)
96+
97+
new_git_repository(
98+
name = "com_github_improbable_io_go_proto_logfields_proto",
99+
commit = "6e66e74a1763de7e1372586f671d4a88023297eb",
100+
remote = "https://github.com/improbable-io/go-proto-logfields",
101+
build_file = "@//third_party/proto_logfields:BUILD",
102+
strip_prefix = "src",
103+
)
104+
89105
maven_jar(
90106
name = "com_atlassian_commonmark_commonmark",
91107
artifact = "com.atlassian.commonmark:commonmark:0.9.0",

apis/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ proto_library(
2626
":platform_api_protos",
2727
],
2828
deps = [
29+
"@improbable_protoc_gen_gocli//:gocli_proto",
30+
"@com_github_improbable_io_go_proto_logfields_proto//:logfields_proto",
2931
"@com_github_googleapis_googleapis//:important_protos_lib",
3032
"@com_github_mwitkow_go_proto_validators_proto//:validator_proto",
3133
"@com_google_protobuf//:field_mask_proto",

apis/deployment_v1alpha1/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ csharp_proto_compile(
1818
name = "grpc",
1919
imports = [
2020
"external/com_github_googleapis_googleapis/",
21+
"external/com_github_improbable_io_go_proto_logfields_proto/",
2122
"external/com_github_mwitkow_go_proto_validators_proto/",
2223
"external/com_google_protobuf/src/",
24+
"external/improbable_protoc_gen_gocli/",
2325
],
2426
inputs = [
2527
"@com_google_protobuf//:well_known_protos",
2628
"@com_github_googleapis_googleapis//:important_protos",
2729
"@com_github_mwitkow_go_proto_validators_proto//:proto",
30+
"@com_github_improbable_io_go_proto_logfields_proto//:proto",
31+
"@improbable_protoc_gen_gocli//:proto",
2832
],
2933
protos = [
3034
"@improbable_platform//proto/improbable/spatialos/deployment:protos",

apis/deployment_v1alpha1/Deployment.cs

Lines changed: 349 additions & 95 deletions
Large diffs are not rendered by default.

apis/deployment_v1alpha1/DeploymentGrpc.cs

Lines changed: 84 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public static partial class DeploymentService
2525
static readonly grpc::Marshaller<global::Improbable.SpatialOS.Deployment.V1Alpha1.GetDeploymentResponse> __Marshaller_GetDeploymentResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Improbable.SpatialOS.Deployment.V1Alpha1.GetDeploymentResponse.Parser.ParseFrom);
2626
static readonly grpc::Marshaller<global::Improbable.SpatialOS.Deployment.V1Alpha1.CreateDeploymentRequest> __Marshaller_CreateDeploymentRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Improbable.SpatialOS.Deployment.V1Alpha1.CreateDeploymentRequest.Parser.ParseFrom);
2727
static readonly grpc::Marshaller<global::Google.LongRunning.Operation> __Marshaller_Operation = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.LongRunning.Operation.Parser.ParseFrom);
28+
static readonly grpc::Marshaller<global::Improbable.SpatialOS.Deployment.V1Alpha1.DeleteDeploymentRequest> __Marshaller_DeleteDeploymentRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Improbable.SpatialOS.Deployment.V1Alpha1.DeleteDeploymentRequest.Parser.ParseFrom);
2829
static readonly grpc::Marshaller<global::Improbable.SpatialOS.Deployment.V1Alpha1.UpdateDeploymentRequest> __Marshaller_UpdateDeploymentRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Improbable.SpatialOS.Deployment.V1Alpha1.UpdateDeploymentRequest.Parser.ParseFrom);
2930
static readonly grpc::Marshaller<global::Improbable.SpatialOS.Deployment.V1Alpha1.UpdateDeploymentResponse> __Marshaller_UpdateDeploymentResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Improbable.SpatialOS.Deployment.V1Alpha1.UpdateDeploymentResponse.Parser.ParseFrom);
3031
static readonly grpc::Marshaller<global::Improbable.SpatialOS.Deployment.V1Alpha1.StopDeploymentRequest> __Marshaller_StopDeploymentRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Improbable.SpatialOS.Deployment.V1Alpha1.StopDeploymentRequest.Parser.ParseFrom);
@@ -51,6 +52,13 @@ public static partial class DeploymentService
5152
__Marshaller_CreateDeploymentRequest,
5253
__Marshaller_Operation);
5354

55+
static readonly grpc::Method<global::Improbable.SpatialOS.Deployment.V1Alpha1.DeleteDeploymentRequest, global::Google.LongRunning.Operation> __Method_DeleteDeployment = new grpc::Method<global::Improbable.SpatialOS.Deployment.V1Alpha1.DeleteDeploymentRequest, global::Google.LongRunning.Operation>(
56+
grpc::MethodType.Unary,
57+
__ServiceName,
58+
"DeleteDeployment",
59+
__Marshaller_DeleteDeploymentRequest,
60+
__Marshaller_Operation);
61+
5462
static readonly grpc::Method<global::Improbable.SpatialOS.Deployment.V1Alpha1.UpdateDeploymentRequest, global::Improbable.SpatialOS.Deployment.V1Alpha1.UpdateDeploymentResponse> __Method_UpdateDeployment = new grpc::Method<global::Improbable.SpatialOS.Deployment.V1Alpha1.UpdateDeploymentRequest, global::Improbable.SpatialOS.Deployment.V1Alpha1.UpdateDeploymentResponse>(
5563
grpc::MethodType.Unary,
5664
__ServiceName,
@@ -109,6 +117,19 @@ public abstract partial class DeploymentServiceBase
109117
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
110118
}
111119

120+
/// <summary>
121+
/// Deletes a deployment.
122+
///
123+
/// The returned operation result is of type `DeleteDeploymentResponse` upon successful deletion.
124+
/// </summary>
125+
/// <param name="request">The request received from the client.</param>
126+
/// <param name="context">The context of the server-side call handler being invoked.</param>
127+
/// <returns>The response to send back to the client (wrapped by a task).</returns>
128+
public virtual global::System.Threading.Tasks.Task<global::Google.LongRunning.Operation> DeleteDeployment(global::Improbable.SpatialOS.Deployment.V1Alpha1.DeleteDeploymentRequest request, grpc::ServerCallContext context)
129+
{
130+
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
131+
}
132+
112133
/// <summary>
113134
/// Updates a deployment as identified by the deployment's `id`.
114135
/// </summary>
@@ -121,7 +142,8 @@ public abstract partial class DeploymentServiceBase
121142
}
122143

123144
/// <summary>
124-
/// Stops a running deployment.
145+
/// Stops a running deployment. You can call this at any point after you've called `CreateDeployment`.
146+
/// To restart a stopped deployment, call `CreateDeployment` with the same parameters as you did to start the deployment originally.
125147
/// </summary>
126148
/// <param name="request">The request received from the client.</param>
127149
/// <param name="context">The context of the server-side call handler being invoked.</param>
@@ -297,6 +319,58 @@ protected DeploymentServiceClient(ClientBaseConfiguration configuration) : base(
297319
return CallInvoker.AsyncUnaryCall(__Method_CreateDeployment, null, options, request);
298320
}
299321
/// <summary>
322+
/// Deletes a deployment.
323+
///
324+
/// The returned operation result is of type `DeleteDeploymentResponse` upon successful deletion.
325+
/// </summary>
326+
/// <param name="request">The request to send to the server.</param>
327+
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
328+
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
329+
/// <param name="cancellationToken">An optional token for canceling the call.</param>
330+
/// <returns>The response received from the server.</returns>
331+
public virtual global::Google.LongRunning.Operation DeleteDeployment(global::Improbable.SpatialOS.Deployment.V1Alpha1.DeleteDeploymentRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
332+
{
333+
return DeleteDeployment(request, new grpc::CallOptions(headers, deadline, cancellationToken));
334+
}
335+
/// <summary>
336+
/// Deletes a deployment.
337+
///
338+
/// The returned operation result is of type `DeleteDeploymentResponse` upon successful deletion.
339+
/// </summary>
340+
/// <param name="request">The request to send to the server.</param>
341+
/// <param name="options">The options for the call.</param>
342+
/// <returns>The response received from the server.</returns>
343+
public virtual global::Google.LongRunning.Operation DeleteDeployment(global::Improbable.SpatialOS.Deployment.V1Alpha1.DeleteDeploymentRequest request, grpc::CallOptions options)
344+
{
345+
return CallInvoker.BlockingUnaryCall(__Method_DeleteDeployment, null, options, request);
346+
}
347+
/// <summary>
348+
/// Deletes a deployment.
349+
///
350+
/// The returned operation result is of type `DeleteDeploymentResponse` upon successful deletion.
351+
/// </summary>
352+
/// <param name="request">The request to send to the server.</param>
353+
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
354+
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
355+
/// <param name="cancellationToken">An optional token for canceling the call.</param>
356+
/// <returns>The call object.</returns>
357+
public virtual grpc::AsyncUnaryCall<global::Google.LongRunning.Operation> DeleteDeploymentAsync(global::Improbable.SpatialOS.Deployment.V1Alpha1.DeleteDeploymentRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
358+
{
359+
return DeleteDeploymentAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
360+
}
361+
/// <summary>
362+
/// Deletes a deployment.
363+
///
364+
/// The returned operation result is of type `DeleteDeploymentResponse` upon successful deletion.
365+
/// </summary>
366+
/// <param name="request">The request to send to the server.</param>
367+
/// <param name="options">The options for the call.</param>
368+
/// <returns>The call object.</returns>
369+
public virtual grpc::AsyncUnaryCall<global::Google.LongRunning.Operation> DeleteDeploymentAsync(global::Improbable.SpatialOS.Deployment.V1Alpha1.DeleteDeploymentRequest request, grpc::CallOptions options)
370+
{
371+
return CallInvoker.AsyncUnaryCall(__Method_DeleteDeployment, null, options, request);
372+
}
373+
/// <summary>
300374
/// Updates a deployment as identified by the deployment's `id`.
301375
/// </summary>
302376
/// <param name="request">The request to send to the server.</param>
@@ -341,7 +415,8 @@ protected DeploymentServiceClient(ClientBaseConfiguration configuration) : base(
341415
return CallInvoker.AsyncUnaryCall(__Method_UpdateDeployment, null, options, request);
342416
}
343417
/// <summary>
344-
/// Stops a running deployment.
418+
/// Stops a running deployment. You can call this at any point after you've called `CreateDeployment`.
419+
/// To restart a stopped deployment, call `CreateDeployment` with the same parameters as you did to start the deployment originally.
345420
/// </summary>
346421
/// <param name="request">The request to send to the server.</param>
347422
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
@@ -353,7 +428,8 @@ protected DeploymentServiceClient(ClientBaseConfiguration configuration) : base(
353428
return StopDeployment(request, new grpc::CallOptions(headers, deadline, cancellationToken));
354429
}
355430
/// <summary>
356-
/// Stops a running deployment.
431+
/// Stops a running deployment. You can call this at any point after you've called `CreateDeployment`.
432+
/// To restart a stopped deployment, call `CreateDeployment` with the same parameters as you did to start the deployment originally.
357433
/// </summary>
358434
/// <param name="request">The request to send to the server.</param>
359435
/// <param name="options">The options for the call.</param>
@@ -363,7 +439,8 @@ protected DeploymentServiceClient(ClientBaseConfiguration configuration) : base(
363439
return CallInvoker.BlockingUnaryCall(__Method_StopDeployment, null, options, request);
364440
}
365441
/// <summary>
366-
/// Stops a running deployment.
442+
/// Stops a running deployment. You can call this at any point after you've called `CreateDeployment`.
443+
/// To restart a stopped deployment, call `CreateDeployment` with the same parameters as you did to start the deployment originally.
367444
/// </summary>
368445
/// <param name="request">The request to send to the server.</param>
369446
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
@@ -375,7 +452,8 @@ protected DeploymentServiceClient(ClientBaseConfiguration configuration) : base(
375452
return StopDeploymentAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
376453
}
377454
/// <summary>
378-
/// Stops a running deployment.
455+
/// Stops a running deployment. You can call this at any point after you've called `CreateDeployment`.
456+
/// To restart a stopped deployment, call `CreateDeployment` with the same parameters as you did to start the deployment originally.
379457
/// </summary>
380458
/// <param name="request">The request to send to the server.</param>
381459
/// <param name="options">The options for the call.</param>
@@ -399,6 +477,7 @@ protected override DeploymentServiceClient NewInstance(ClientBaseConfiguration c
399477
.AddMethod(__Method_ListDeployments, serviceImpl.ListDeployments)
400478
.AddMethod(__Method_GetDeployment, serviceImpl.GetDeployment)
401479
.AddMethod(__Method_CreateDeployment, serviceImpl.CreateDeployment)
480+
.AddMethod(__Method_DeleteDeployment, serviceImpl.DeleteDeployment)
402481
.AddMethod(__Method_UpdateDeployment, serviceImpl.UpdateDeployment)
403482
.AddMethod(__Method_StopDeployment, serviceImpl.StopDeployment).Build();
404483
}

0 commit comments

Comments
 (0)