Skip to content

Commit b4a358f

Browse files
Generate protos
1 parent 67ec3a9 commit b4a358f

File tree

4 files changed

+339
-1
lines changed

4 files changed

+339
-1
lines changed

ee/ephemeral_environments/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export MIX_ENV?=dev
33
include ../../Makefile
44

55
APP_NAME := $(shell grep 'app:' mix.exs | cut -d ':' -f3 | cut -d ',' -f1)
6-
INTERNAL_API_BRANCH?=master
6+
INTERNAL_API_BRANCH=master
77
PROTOC_TAG=1.18.4-3.20.1-0.13.0
88
TMP_REPO_DIR?=/tmp/internal_api
99

Lines changed: 321 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,321 @@
1+
defmodule InternalApi.EphemeralEnvironments.InstanceState do
2+
@moduledoc false
3+
4+
use Protobuf, enum: true, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
5+
6+
field :INSTANCE_STATE_UNSPECIFIED, 0
7+
field :INSTANCE_STATE_ZERO_STATE, 1
8+
field :INSTANCE_STATE_PROVISIONING, 2
9+
field :INSTANCE_STATE_READY_TO_USE, 3
10+
field :INSTANCE_STATE_SLEEP, 4
11+
field :INSTANCE_STATE_IN_USE, 5
12+
field :INSTANCE_STATE_DEPLOYING, 6
13+
field :INSTANCE_STATE_DEPROVISIONING, 7
14+
field :INSTANCE_STATE_DESTROYED, 8
15+
field :INSTANCE_STATE_ACKNOWLEDGED_CLEANUP, 9
16+
field :INSTANCE_STATE_FAILED_PROVISIONING, 10
17+
field :INSTANCE_STATE_FAILED_DEPROVISIONING, 11
18+
field :INSTANCE_STATE_FAILED_DEPLOYMENT, 12
19+
field :INSTANCE_STATE_FAILED_CLEANUP, 13
20+
field :INSTANCE_STATE_FAILED_SLEEP, 14
21+
field :INSTANCE_STATE_FAILED_WAKE_UP, 15
22+
end
23+
24+
defmodule InternalApi.EphemeralEnvironments.StateChangeActionType do
25+
@moduledoc false
26+
27+
use Protobuf, enum: true, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
28+
29+
field :STATE_CHANGE_ACTION_TYPE_UNSPECIFIED, 0
30+
field :STATE_CHANGE_ACTION_TYPE_PROVISIONING, 1
31+
field :STATE_CHANGE_ACTION_TYPE_CLEANUP, 2
32+
field :STATE_CHANGE_ACTION_TYPE_TO_SLEEP, 3
33+
field :STATE_CHANGE_ACTION_TYPE_WAKE_UP, 4
34+
field :STATE_CHANGE_ACTION_TYPE_DEPLOYING, 5
35+
field :STATE_CHANGE_ACTION_TYPE_CLEANING_UP, 6
36+
field :STATE_CHANGE_ACTION_TYPE_DEPROVISIONING, 7
37+
end
38+
39+
defmodule InternalApi.EphemeralEnvironments.StateChangeResult do
40+
@moduledoc false
41+
42+
use Protobuf, enum: true, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
43+
44+
field :STATE_CHANGE_RESULT_UNSPECIFIED, 0
45+
field :STATE_CHANGE_RESULT_PASSED, 1
46+
field :STATE_CHANGE_RESULT_PENDING, 2
47+
field :STATE_CHANGE_RESULT_FAILED, 3
48+
end
49+
50+
defmodule InternalApi.EphemeralEnvironments.TriggererType do
51+
@moduledoc false
52+
53+
use Protobuf, enum: true, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
54+
55+
field :TRIGGERER_TYPE_UNSPECIFIED, 0
56+
field :TRIGGERER_TYPE_USER, 1
57+
field :TRIGGERER_TYPE_AUTOMATION_RULE, 2
58+
end
59+
60+
defmodule InternalApi.EphemeralEnvironments.TypeState do
61+
@moduledoc false
62+
63+
use Protobuf, enum: true, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
64+
65+
field :TYPE_STATE_UNSPECIFIED, 0
66+
field :TYPE_STATE_DRAFT, 1
67+
field :TYPE_STATE_READY, 2
68+
field :TYPE_STATE_CORDONED, 3
69+
field :TYPE_STATE_DELETED, 4
70+
end
71+
72+
defmodule InternalApi.EphemeralEnvironments.ListRequest do
73+
@moduledoc false
74+
75+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
76+
77+
field :org_id, 1, type: :string, json_name: "orgId"
78+
field :project_id, 2, type: :string, json_name: "projectId"
79+
end
80+
81+
defmodule InternalApi.EphemeralEnvironments.ListResponse do
82+
@moduledoc false
83+
84+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
85+
86+
field :environment_types, 1,
87+
repeated: true,
88+
type: InternalApi.EphemeralEnvironments.EphemeralEnvironmentType,
89+
json_name: "environmentTypes"
90+
end
91+
92+
defmodule InternalApi.EphemeralEnvironments.DescribeRequest do
93+
@moduledoc false
94+
95+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
96+
97+
field :id, 1, type: :string
98+
field :org_id, 2, type: :string, json_name: "orgId"
99+
end
100+
101+
defmodule InternalApi.EphemeralEnvironments.DescribeResponse do
102+
@moduledoc false
103+
104+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
105+
106+
field :environment_type, 1,
107+
type: InternalApi.EphemeralEnvironments.EphemeralEnvironmentType,
108+
json_name: "environmentType"
109+
110+
field :instances, 2,
111+
repeated: true,
112+
type: InternalApi.EphemeralEnvironments.EphemeralEnvironmentInstance
113+
end
114+
115+
defmodule InternalApi.EphemeralEnvironments.CreateRequest do
116+
@moduledoc false
117+
118+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
119+
120+
field :environment_type, 1,
121+
type: InternalApi.EphemeralEnvironments.EphemeralEnvironmentType,
122+
json_name: "environmentType"
123+
end
124+
125+
defmodule InternalApi.EphemeralEnvironments.CreateResponse do
126+
@moduledoc false
127+
128+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
129+
130+
field :environment_type, 1,
131+
type: InternalApi.EphemeralEnvironments.EphemeralEnvironmentType,
132+
json_name: "environmentType"
133+
end
134+
135+
defmodule InternalApi.EphemeralEnvironments.UpdateRequest do
136+
@moduledoc false
137+
138+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
139+
140+
field :environment_type, 1,
141+
type: InternalApi.EphemeralEnvironments.EphemeralEnvironmentType,
142+
json_name: "environmentType"
143+
end
144+
145+
defmodule InternalApi.EphemeralEnvironments.UpdateResponse do
146+
@moduledoc false
147+
148+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
149+
150+
field :environment_type, 1,
151+
type: InternalApi.EphemeralEnvironments.EphemeralEnvironmentType,
152+
json_name: "environmentType"
153+
end
154+
155+
defmodule InternalApi.EphemeralEnvironments.DeleteRequest do
156+
@moduledoc false
157+
158+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
159+
160+
field :id, 1, type: :string
161+
field :org_id, 2, type: :string, json_name: "orgId"
162+
end
163+
164+
defmodule InternalApi.EphemeralEnvironments.DeleteResponse do
165+
@moduledoc false
166+
167+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
168+
end
169+
170+
defmodule InternalApi.EphemeralEnvironments.CordonRequest do
171+
@moduledoc false
172+
173+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
174+
175+
field :id, 1, type: :string
176+
field :org_id, 2, type: :string, json_name: "orgId"
177+
end
178+
179+
defmodule InternalApi.EphemeralEnvironments.CordonResponse do
180+
@moduledoc false
181+
182+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
183+
184+
field :environment_type, 1,
185+
type: InternalApi.EphemeralEnvironments.EphemeralEnvironmentType,
186+
json_name: "environmentType"
187+
end
188+
189+
defmodule InternalApi.EphemeralEnvironments.EphemeralEnvironmentType do
190+
@moduledoc false
191+
192+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
193+
194+
field :id, 1, type: :string
195+
field :org_id, 2, type: :string, json_name: "orgId"
196+
field :name, 3, type: :string
197+
field :description, 4, type: :string
198+
field :created_by, 5, type: :string, json_name: "createdBy"
199+
field :last_updated_by, 6, type: :string, json_name: "lastUpdatedBy"
200+
field :created_at, 7, type: Google.Protobuf.Timestamp, json_name: "createdAt"
201+
field :updated_at, 8, type: Google.Protobuf.Timestamp, json_name: "updatedAt"
202+
field :state, 9, type: InternalApi.EphemeralEnvironments.TypeState, enum: true
203+
field :max_number_of_instances, 10, type: :int32, json_name: "maxNumberOfInstances"
204+
end
205+
206+
defmodule InternalApi.EphemeralEnvironments.EphemeralEnvironmentInstance do
207+
@moduledoc false
208+
209+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
210+
211+
field :id, 1, type: :string
212+
field :ee_type_id, 2, type: :string, json_name: "eeTypeId"
213+
field :name, 3, type: :string
214+
field :state, 4, type: InternalApi.EphemeralEnvironments.InstanceState, enum: true
215+
field :last_state_change_id, 5, type: :string, json_name: "lastStateChangeId"
216+
field :created_at, 6, type: Google.Protobuf.Timestamp, json_name: "createdAt"
217+
field :updated_at, 7, type: Google.Protobuf.Timestamp, json_name: "updatedAt"
218+
end
219+
220+
defmodule InternalApi.EphemeralEnvironments.EphemeralSecretDefinition do
221+
@moduledoc false
222+
223+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
224+
225+
field :id, 1, type: :string
226+
field :ee_type_id, 2, type: :string, json_name: "eeTypeId"
227+
field :name, 3, type: :string
228+
field :description, 4, type: :string
229+
230+
field :actions_that_can_change_the_secret, 5,
231+
repeated: true,
232+
type: InternalApi.EphemeralEnvironments.StateChangeAction,
233+
json_name: "actionsThatCanChangeTheSecret"
234+
235+
field :actions_that_have_access_to_the_secret, 6,
236+
repeated: true,
237+
type: InternalApi.EphemeralEnvironments.StateChangeAction,
238+
json_name: "actionsThatHaveAccessToTheSecret"
239+
end
240+
241+
defmodule InternalApi.EphemeralEnvironments.StateChangeAction do
242+
@moduledoc false
243+
244+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
245+
246+
field :id, 1, type: :string
247+
field :type, 2, type: InternalApi.EphemeralEnvironments.StateChangeActionType, enum: true
248+
field :project_id, 3, type: :string, json_name: "projectId"
249+
field :branch, 4, type: :string
250+
field :pipeline_yaml_name, 5, type: :string, json_name: "pipelineYamlName"
251+
field :execution_auth_rules, 6, type: :string, json_name: "executionAuthRules"
252+
end
253+
254+
defmodule InternalApi.EphemeralEnvironments.InstanceStateChange do
255+
@moduledoc false
256+
257+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
258+
259+
field :id, 1, type: :string
260+
field :instance_id, 2, type: :string, json_name: "instanceId"
261+
262+
field :prev_state, 3,
263+
type: InternalApi.EphemeralEnvironments.InstanceState,
264+
json_name: "prevState",
265+
enum: true
266+
267+
field :next_state, 4,
268+
type: InternalApi.EphemeralEnvironments.InstanceState,
269+
json_name: "nextState",
270+
enum: true
271+
272+
field :state_change_action, 5,
273+
type: InternalApi.EphemeralEnvironments.StateChangeAction,
274+
json_name: "stateChangeAction"
275+
276+
field :result, 6, type: InternalApi.EphemeralEnvironments.StateChangeResult, enum: true
277+
field :TriggererType, 7, type: :string
278+
field :trigger_id, 8, type: :string, json_name: "triggerId"
279+
field :execution_pipeline_id, 9, type: :string, json_name: "executionPipelineId"
280+
field :execution_workflow_id, 10, type: :string, json_name: "executionWorkflowId"
281+
field :started_at, 11, type: Google.Protobuf.Timestamp, json_name: "startedAt"
282+
field :finished_at, 12, type: Google.Protobuf.Timestamp, json_name: "finishedAt"
283+
end
284+
285+
defmodule InternalApi.EphemeralEnvironments.EphemeralEnvironments.Service do
286+
@moduledoc false
287+
288+
use GRPC.Service,
289+
name: "InternalApi.EphemeralEnvironments.EphemeralEnvironments",
290+
protoc_gen_elixir_version: "0.13.0"
291+
292+
rpc :List,
293+
InternalApi.EphemeralEnvironments.ListRequest,
294+
InternalApi.EphemeralEnvironments.ListResponse
295+
296+
rpc :Describe,
297+
InternalApi.EphemeralEnvironments.DescribeRequest,
298+
InternalApi.EphemeralEnvironments.DescribeResponse
299+
300+
rpc :Create,
301+
InternalApi.EphemeralEnvironments.CreateRequest,
302+
InternalApi.EphemeralEnvironments.CreateResponse
303+
304+
rpc :Update,
305+
InternalApi.EphemeralEnvironments.UpdateRequest,
306+
InternalApi.EphemeralEnvironments.UpdateResponse
307+
308+
rpc :Delete,
309+
InternalApi.EphemeralEnvironments.DeleteRequest,
310+
InternalApi.EphemeralEnvironments.DeleteResponse
311+
312+
rpc :Cordon,
313+
InternalApi.EphemeralEnvironments.CordonRequest,
314+
InternalApi.EphemeralEnvironments.CordonResponse
315+
end
316+
317+
defmodule InternalApi.EphemeralEnvironments.EphemeralEnvironments.Stub do
318+
@moduledoc false
319+
320+
use GRPC.Stub, service: InternalApi.EphemeralEnvironments.EphemeralEnvironments.Service
321+
end
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
defmodule Google.Protobuf.Timestamp do
2+
@moduledoc false
3+
4+
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
5+
6+
field :seconds, 1, type: :int64
7+
field :nanos, 2, type: :int32
8+
end
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
list='
2+
include/google/protobuf/timestamp
3+
ephemeral_environments
4+
'
5+
6+
for element in $list;do
7+
echo "$element"
8+
protoc -I /home/protoc/source -I /home/protoc/source/include --elixir_out=plugins=grpc:/home/protoc/code/lib/internal_api --plugin=/root/.mix/escripts/protoc-gen-elixir /home/protoc/source/$element.proto
9+
done

0 commit comments

Comments
 (0)