Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit ddf9585

Browse files
fix: update retry config (#23)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/53b42596-b590-4067-8006-cff3c7cfb2f1/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 318028816 Source-Link: googleapis/googleapis@b882b8e PiperOrigin-RevId: 317949519 Source-Link: googleapis/googleapis@7157f95 PiperOrigin-RevId: 317872942 Source-Link: googleapis/googleapis@df995b6
1 parent 95bd6d5 commit ddf9585

File tree

4 files changed

+181
-75
lines changed

4 files changed

+181
-75
lines changed

google/cloud/devtools/containeranalysis_v1/gapic/container_analysis_client_config.py

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,42 @@
11
config = {
22
"interfaces": {
33
"google.devtools.containeranalysis.v1.ContainerAnalysis": {
4-
"retry_codes": {
5-
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
6-
"non_idempotent": [],
7-
},
4+
"retry_codes": {"no_retry_codes": [], "no_retry_1_codes": []},
85
"retry_params": {
9-
"default": {
10-
"initial_retry_delay_millis": 100,
11-
"retry_delay_multiplier": 1.3,
12-
"max_retry_delay_millis": 60000,
13-
"initial_rpc_timeout_millis": 20000,
6+
"no_retry_params": {
7+
"initial_retry_delay_millis": 0,
8+
"retry_delay_multiplier": 0.0,
9+
"max_retry_delay_millis": 0,
10+
"initial_rpc_timeout_millis": 0,
11+
"rpc_timeout_multiplier": 1.0,
12+
"max_rpc_timeout_millis": 0,
13+
"total_timeout_millis": 0,
14+
},
15+
"no_retry_1_params": {
16+
"initial_retry_delay_millis": 0,
17+
"retry_delay_multiplier": 0.0,
18+
"max_retry_delay_millis": 0,
19+
"initial_rpc_timeout_millis": 30000,
1420
"rpc_timeout_multiplier": 1.0,
15-
"max_rpc_timeout_millis": 20000,
16-
"total_timeout_millis": 600000,
17-
}
21+
"max_rpc_timeout_millis": 30000,
22+
"total_timeout_millis": 30000,
23+
},
1824
},
1925
"methods": {
2026
"SetIamPolicy": {
21-
"timeout_millis": 60000,
22-
"retry_codes_name": "non_idempotent",
23-
"retry_params_name": "default",
27+
"timeout_millis": 30000,
28+
"retry_codes_name": "no_retry_1_codes",
29+
"retry_params_name": "no_retry_1_params",
2430
},
2531
"GetIamPolicy": {
26-
"timeout_millis": 60000,
27-
"retry_codes_name": "non_idempotent",
28-
"retry_params_name": "default",
32+
"timeout_millis": 30000,
33+
"retry_codes_name": "no_retry_1_codes",
34+
"retry_params_name": "no_retry_1_params",
2935
},
3036
"TestIamPermissions": {
31-
"timeout_millis": 60000,
32-
"retry_codes_name": "non_idempotent",
33-
"retry_params_name": "default",
37+
"timeout_millis": 30000,
38+
"retry_codes_name": "no_retry_1_codes",
39+
"retry_params_name": "no_retry_1_params",
3440
},
3541
},
3642
}

google/cloud/devtools/containeranalysis_v1/proto/containeranalysis_pb2.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 151 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2+
"""Client and server classes corresponding to protobuf-defined services."""
23
import grpc
34

45
from google.iam.v1 import iam_policy_pb2 as google_dot_iam_dot_v1_dot_iam__policy__pb2
@@ -7,26 +8,26 @@
78

89
class ContainerAnalysisStub(object):
910
"""Retrieves analysis results of Cloud components such as Docker container
10-
images. The Container Analysis API is an implementation of the
11-
[Grafeas](https://grafeas.io) API.
12-
13-
Analysis results are stored as a series of occurrences. An `Occurrence`
14-
contains information about a specific analysis instance on a resource. An
15-
occurrence refers to a `Note`. A note contains details describing the
16-
analysis and is generally stored in a separate project, called a `Provider`.
17-
Multiple occurrences can refer to the same note.
18-
19-
For example, an SSL vulnerability could affect multiple images. In this case,
20-
there would be one note for the vulnerability and an occurrence for each
21-
image with the vulnerability referring to that note.
22-
"""
11+
images. The Container Analysis API is an implementation of the
12+
[Grafeas](https://grafeas.io) API.
13+
14+
Analysis results are stored as a series of occurrences. An `Occurrence`
15+
contains information about a specific analysis instance on a resource. An
16+
occurrence refers to a `Note`. A note contains details describing the
17+
analysis and is generally stored in a separate project, called a `Provider`.
18+
Multiple occurrences can refer to the same note.
19+
20+
For example, an SSL vulnerability could affect multiple images. In this case,
21+
there would be one note for the vulnerability and an occurrence for each
22+
image with the vulnerability referring to that note.
23+
"""
2324

2425
def __init__(self, channel):
2526
"""Constructor.
2627
27-
Args:
28-
channel: A grpc.Channel.
29-
"""
28+
Args:
29+
channel: A grpc.Channel.
30+
"""
3031
self.SetIamPolicy = channel.unary_unary(
3132
"/google.devtools.containeranalysis.v1.ContainerAnalysis/SetIamPolicy",
3233
request_serializer=google_dot_iam_dot_v1_dot_iam__policy__pb2.SetIamPolicyRequest.SerializeToString,
@@ -46,57 +47,57 @@ def __init__(self, channel):
4647

4748
class ContainerAnalysisServicer(object):
4849
"""Retrieves analysis results of Cloud components such as Docker container
49-
images. The Container Analysis API is an implementation of the
50-
[Grafeas](https://grafeas.io) API.
51-
52-
Analysis results are stored as a series of occurrences. An `Occurrence`
53-
contains information about a specific analysis instance on a resource. An
54-
occurrence refers to a `Note`. A note contains details describing the
55-
analysis and is generally stored in a separate project, called a `Provider`.
56-
Multiple occurrences can refer to the same note.
57-
58-
For example, an SSL vulnerability could affect multiple images. In this case,
59-
there would be one note for the vulnerability and an occurrence for each
60-
image with the vulnerability referring to that note.
61-
"""
50+
images. The Container Analysis API is an implementation of the
51+
[Grafeas](https://grafeas.io) API.
52+
53+
Analysis results are stored as a series of occurrences. An `Occurrence`
54+
contains information about a specific analysis instance on a resource. An
55+
occurrence refers to a `Note`. A note contains details describing the
56+
analysis and is generally stored in a separate project, called a `Provider`.
57+
Multiple occurrences can refer to the same note.
58+
59+
For example, an SSL vulnerability could affect multiple images. In this case,
60+
there would be one note for the vulnerability and an occurrence for each
61+
image with the vulnerability referring to that note.
62+
"""
6263

6364
def SetIamPolicy(self, request, context):
6465
"""Sets the access control policy on the specified note or occurrence.
65-
Requires `containeranalysis.notes.setIamPolicy` or
66-
`containeranalysis.occurrences.setIamPolicy` permission if the resource is
67-
a note or an occurrence, respectively.
68-
69-
The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
70-
notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
71-
occurrences.
72-
"""
66+
Requires `containeranalysis.notes.setIamPolicy` or
67+
`containeranalysis.occurrences.setIamPolicy` permission if the resource is
68+
a note or an occurrence, respectively.
69+
70+
The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
71+
notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
72+
occurrences.
73+
"""
7374
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
7475
context.set_details("Method not implemented!")
7576
raise NotImplementedError("Method not implemented!")
7677

7778
def GetIamPolicy(self, request, context):
7879
"""Gets the access control policy for a note or an occurrence resource.
79-
Requires `containeranalysis.notes.setIamPolicy` or
80-
`containeranalysis.occurrences.setIamPolicy` permission if the resource is
81-
a note or occurrence, respectively.
82-
83-
The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
84-
notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
85-
occurrences.
86-
"""
80+
Requires `containeranalysis.notes.setIamPolicy` or
81+
`containeranalysis.occurrences.setIamPolicy` permission if the resource is
82+
a note or occurrence, respectively.
83+
84+
The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
85+
notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
86+
occurrences.
87+
"""
8788
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
8889
context.set_details("Method not implemented!")
8990
raise NotImplementedError("Method not implemented!")
9091

9192
def TestIamPermissions(self, request, context):
9293
"""Returns the permissions that a caller has on the specified note or
93-
occurrence. Requires list permission on the project (for example,
94-
`containeranalysis.notes.list`).
94+
occurrence. Requires list permission on the project (for example,
95+
`containeranalysis.notes.list`).
9596
96-
The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
97-
notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
98-
occurrences.
99-
"""
97+
The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
98+
notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
99+
occurrences.
100+
"""
100101
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
101102
context.set_details("Method not implemented!")
102103
raise NotImplementedError("Method not implemented!")
@@ -124,3 +125,102 @@ def add_ContainerAnalysisServicer_to_server(servicer, server):
124125
"google.devtools.containeranalysis.v1.ContainerAnalysis", rpc_method_handlers
125126
)
126127
server.add_generic_rpc_handlers((generic_handler,))
128+
129+
130+
# This class is part of an EXPERIMENTAL API.
131+
class ContainerAnalysis(object):
132+
"""Retrieves analysis results of Cloud components such as Docker container
133+
images. The Container Analysis API is an implementation of the
134+
[Grafeas](https://grafeas.io) API.
135+
136+
Analysis results are stored as a series of occurrences. An `Occurrence`
137+
contains information about a specific analysis instance on a resource. An
138+
occurrence refers to a `Note`. A note contains details describing the
139+
analysis and is generally stored in a separate project, called a `Provider`.
140+
Multiple occurrences can refer to the same note.
141+
142+
For example, an SSL vulnerability could affect multiple images. In this case,
143+
there would be one note for the vulnerability and an occurrence for each
144+
image with the vulnerability referring to that note.
145+
"""
146+
147+
@staticmethod
148+
def SetIamPolicy(
149+
request,
150+
target,
151+
options=(),
152+
channel_credentials=None,
153+
call_credentials=None,
154+
compression=None,
155+
wait_for_ready=None,
156+
timeout=None,
157+
metadata=None,
158+
):
159+
return grpc.experimental.unary_unary(
160+
request,
161+
target,
162+
"/google.devtools.containeranalysis.v1.ContainerAnalysis/SetIamPolicy",
163+
google_dot_iam_dot_v1_dot_iam__policy__pb2.SetIamPolicyRequest.SerializeToString,
164+
google_dot_iam_dot_v1_dot_policy__pb2.Policy.FromString,
165+
options,
166+
channel_credentials,
167+
call_credentials,
168+
compression,
169+
wait_for_ready,
170+
timeout,
171+
metadata,
172+
)
173+
174+
@staticmethod
175+
def GetIamPolicy(
176+
request,
177+
target,
178+
options=(),
179+
channel_credentials=None,
180+
call_credentials=None,
181+
compression=None,
182+
wait_for_ready=None,
183+
timeout=None,
184+
metadata=None,
185+
):
186+
return grpc.experimental.unary_unary(
187+
request,
188+
target,
189+
"/google.devtools.containeranalysis.v1.ContainerAnalysis/GetIamPolicy",
190+
google_dot_iam_dot_v1_dot_iam__policy__pb2.GetIamPolicyRequest.SerializeToString,
191+
google_dot_iam_dot_v1_dot_policy__pb2.Policy.FromString,
192+
options,
193+
channel_credentials,
194+
call_credentials,
195+
compression,
196+
wait_for_ready,
197+
timeout,
198+
metadata,
199+
)
200+
201+
@staticmethod
202+
def TestIamPermissions(
203+
request,
204+
target,
205+
options=(),
206+
channel_credentials=None,
207+
call_credentials=None,
208+
compression=None,
209+
wait_for_ready=None,
210+
timeout=None,
211+
metadata=None,
212+
):
213+
return grpc.experimental.unary_unary(
214+
request,
215+
target,
216+
"/google.devtools.containeranalysis.v1.ContainerAnalysis/TestIamPermissions",
217+
google_dot_iam_dot_v1_dot_iam__policy__pb2.TestIamPermissionsRequest.SerializeToString,
218+
google_dot_iam_dot_v1_dot_iam__policy__pb2.TestIamPermissionsResponse.FromString,
219+
options,
220+
channel_credentials,
221+
call_credentials,
222+
compression,
223+
wait_for_ready,
224+
timeout,
225+
metadata,
226+
)

synth.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "cf41866c6f14f10a07aa1e2a1260fc0a2727d889",
15-
"internalRef": "317812187"
14+
"sha": "b882b8e6bfcd708042ff00f7adc67ce750817dd0",
15+
"internalRef": "318028816"
1616
}
1717
},
1818
{

0 commit comments

Comments
 (0)