Skip to content

Commit 0bb14ce

Browse files
authored
feat: generate v1alpha (#25)
1 parent d13f342 commit 0bb14ce

13 files changed

+1544
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreateJob
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-batch
24+
25+
26+
# [START batch_v1alpha_generated_BatchService_CreateJob_async]
27+
from google.cloud import batch_v1alpha
28+
29+
30+
async def sample_create_job():
31+
# Create a client
32+
client = batch_v1alpha.BatchServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = batch_v1alpha.CreateJobRequest(
36+
parent="parent_value",
37+
)
38+
39+
# Make the request
40+
response = await client.create_job(request=request)
41+
42+
# Handle the response
43+
print(response)
44+
45+
# [END batch_v1alpha_generated_BatchService_CreateJob_async]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreateJob
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-batch
24+
25+
26+
# [START batch_v1alpha_generated_BatchService_CreateJob_sync]
27+
from google.cloud import batch_v1alpha
28+
29+
30+
def sample_create_job():
31+
# Create a client
32+
client = batch_v1alpha.BatchServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = batch_v1alpha.CreateJobRequest(
36+
parent="parent_value",
37+
)
38+
39+
# Make the request
40+
response = client.create_job(request=request)
41+
42+
# Handle the response
43+
print(response)
44+
45+
# [END batch_v1alpha_generated_BatchService_CreateJob_sync]
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for DeleteJob
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-batch
24+
25+
26+
# [START batch_v1alpha_generated_BatchService_DeleteJob_async]
27+
from google.cloud import batch_v1alpha
28+
29+
30+
async def sample_delete_job():
31+
# Create a client
32+
client = batch_v1alpha.BatchServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = batch_v1alpha.DeleteJobRequest(
36+
)
37+
38+
# Make the request
39+
operation = client.delete_job(request=request)
40+
41+
print("Waiting for operation to complete...")
42+
43+
response = await operation.result()
44+
45+
# Handle the response
46+
print(response)
47+
48+
# [END batch_v1alpha_generated_BatchService_DeleteJob_async]
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for DeleteJob
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-batch
24+
25+
26+
# [START batch_v1alpha_generated_BatchService_DeleteJob_sync]
27+
from google.cloud import batch_v1alpha
28+
29+
30+
def sample_delete_job():
31+
# Create a client
32+
client = batch_v1alpha.BatchServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = batch_v1alpha.DeleteJobRequest(
36+
)
37+
38+
# Make the request
39+
operation = client.delete_job(request=request)
40+
41+
print("Waiting for operation to complete...")
42+
43+
response = operation.result()
44+
45+
# Handle the response
46+
print(response)
47+
48+
# [END batch_v1alpha_generated_BatchService_DeleteJob_sync]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for GetJob
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-batch
24+
25+
26+
# [START batch_v1alpha_generated_BatchService_GetJob_async]
27+
from google.cloud import batch_v1alpha
28+
29+
30+
async def sample_get_job():
31+
# Create a client
32+
client = batch_v1alpha.BatchServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = batch_v1alpha.GetJobRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
response = await client.get_job(request=request)
41+
42+
# Handle the response
43+
print(response)
44+
45+
# [END batch_v1alpha_generated_BatchService_GetJob_async]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for GetJob
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-batch
24+
25+
26+
# [START batch_v1alpha_generated_BatchService_GetJob_sync]
27+
from google.cloud import batch_v1alpha
28+
29+
30+
def sample_get_job():
31+
# Create a client
32+
client = batch_v1alpha.BatchServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = batch_v1alpha.GetJobRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
response = client.get_job(request=request)
41+
42+
# Handle the response
43+
print(response)
44+
45+
# [END batch_v1alpha_generated_BatchService_GetJob_sync]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for GetTask
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-batch
24+
25+
26+
# [START batch_v1alpha_generated_BatchService_GetTask_async]
27+
from google.cloud import batch_v1alpha
28+
29+
30+
async def sample_get_task():
31+
# Create a client
32+
client = batch_v1alpha.BatchServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = batch_v1alpha.GetTaskRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
response = await client.get_task(request=request)
41+
42+
# Handle the response
43+
print(response)
44+
45+
# [END batch_v1alpha_generated_BatchService_GetTask_async]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for GetTask
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-batch
24+
25+
26+
# [START batch_v1alpha_generated_BatchService_GetTask_sync]
27+
from google.cloud import batch_v1alpha
28+
29+
30+
def sample_get_task():
31+
# Create a client
32+
client = batch_v1alpha.BatchServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = batch_v1alpha.GetTaskRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
response = client.get_task(request=request)
41+
42+
# Handle the response
43+
print(response)
44+
45+
# [END batch_v1alpha_generated_BatchService_GetTask_sync]

0 commit comments

Comments
 (0)