Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tasks/google/cloud/tasks_v2/gapic/cloud_tasks_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from google.cloud.tasks_v2.proto import queue_pb2
from google.cloud.tasks_v2.proto import task_pb2
from google.iam.v1 import iam_policy_pb2
from google.iam.v1 import options_pb2
from google.iam.v1 import policy_pb2
from google.protobuf import empty_pb2
from google.protobuf import field_mask_pb2
Expand Down Expand Up @@ -938,6 +939,7 @@ def resume_queue(
def get_iam_policy(
self,
resource,
options_=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
Expand All @@ -964,6 +966,11 @@ def get_iam_policy(
Args:
resource (str): REQUIRED: The resource for which the policy is being requested.
See the operation documentation for the appropriate value for this field.
options_ (Union[dict, ~google.cloud.tasks_v2.types.GetPolicyOptions]): OPTIONAL: A ``GetPolicyOptions`` object for specifying options to
``GetIamPolicy``. This field is only used by Cloud IAM.

If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.tasks_v2.types.GetPolicyOptions`
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand Down Expand Up @@ -994,7 +1001,9 @@ def get_iam_policy(
client_info=self._client_info,
)

request = iam_policy_pb2.GetIamPolicyRequest(resource=resource)
request = iam_policy_pb2.GetIamPolicyRequest(
resource=resource, options=options_
)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
2 changes: 2 additions & 0 deletions tasks/google/cloud/tasks_v2/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from google.cloud.tasks_v2.proto import target_pb2
from google.cloud.tasks_v2.proto import task_pb2
from google.iam.v1 import iam_policy_pb2
from google.iam.v1 import options_pb2
from google.iam.v1 import policy_pb2
from google.protobuf import any_pb2
from google.protobuf import duration_pb2
Expand All @@ -37,6 +38,7 @@

_shared_modules = [
iam_policy_pb2,
options_pb2,
policy_pb2,
any_pb2,
duration_pb2,
Expand Down
11 changes: 10 additions & 1 deletion tasks/google/cloud/tasks_v2beta2/gapic/cloud_tasks_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from google.cloud.tasks_v2beta2.proto import queue_pb2
from google.cloud.tasks_v2beta2.proto import task_pb2
from google.iam.v1 import iam_policy_pb2
from google.iam.v1 import options_pb2
from google.iam.v1 import policy_pb2
from google.protobuf import duration_pb2
from google.protobuf import empty_pb2
Expand Down Expand Up @@ -940,6 +941,7 @@ def resume_queue(
def get_iam_policy(
self,
resource,
options_=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
Expand All @@ -966,6 +968,11 @@ def get_iam_policy(
Args:
resource (str): REQUIRED: The resource for which the policy is being requested.
See the operation documentation for the appropriate value for this field.
options_ (Union[dict, ~google.cloud.tasks_v2beta2.types.GetPolicyOptions]): OPTIONAL: A ``GetPolicyOptions`` object for specifying options to
``GetIamPolicy``. This field is only used by Cloud IAM.

If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.tasks_v2beta2.types.GetPolicyOptions`
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand Down Expand Up @@ -996,7 +1003,9 @@ def get_iam_policy(
client_info=self._client_info,
)

request = iam_policy_pb2.GetIamPolicyRequest(resource=resource)
request = iam_policy_pb2.GetIamPolicyRequest(
resource=resource, options=options_
)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
2 changes: 2 additions & 0 deletions tasks/google/cloud/tasks_v2beta2/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from google.cloud.tasks_v2beta2.proto import target_pb2
from google.cloud.tasks_v2beta2.proto import task_pb2
from google.iam.v1 import iam_policy_pb2
from google.iam.v1 import options_pb2
from google.iam.v1 import policy_pb2
from google.protobuf import any_pb2
from google.protobuf import duration_pb2
Expand All @@ -37,6 +38,7 @@

_shared_modules = [
iam_policy_pb2,
options_pb2,
policy_pb2,
any_pb2,
duration_pb2,
Expand Down
11 changes: 10 additions & 1 deletion tasks/google/cloud/tasks_v2beta3/gapic/cloud_tasks_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from google.cloud.tasks_v2beta3.proto import queue_pb2
from google.cloud.tasks_v2beta3.proto import task_pb2
from google.iam.v1 import iam_policy_pb2
from google.iam.v1 import options_pb2
from google.iam.v1 import policy_pb2
from google.protobuf import empty_pb2
from google.protobuf import field_mask_pb2
Expand Down Expand Up @@ -956,6 +957,7 @@ def resume_queue(
def get_iam_policy(
self,
resource,
options_=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
Expand All @@ -982,6 +984,11 @@ def get_iam_policy(
Args:
resource (str): REQUIRED: The resource for which the policy is being requested.
See the operation documentation for the appropriate value for this field.
options_ (Union[dict, ~google.cloud.tasks_v2beta3.types.GetPolicyOptions]): OPTIONAL: A ``GetPolicyOptions`` object for specifying options to
``GetIamPolicy``. This field is only used by Cloud IAM.

If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.tasks_v2beta3.types.GetPolicyOptions`
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand Down Expand Up @@ -1012,7 +1019,9 @@ def get_iam_policy(
client_info=self._client_info,
)

request = iam_policy_pb2.GetIamPolicyRequest(resource=resource)
request = iam_policy_pb2.GetIamPolicyRequest(
resource=resource, options=options_
)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
2 changes: 2 additions & 0 deletions tasks/google/cloud/tasks_v2beta3/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from google.cloud.tasks_v2beta3.proto import target_pb2
from google.cloud.tasks_v2beta3.proto import task_pb2
from google.iam.v1 import iam_policy_pb2
from google.iam.v1 import options_pb2
from google.iam.v1 import policy_pb2
from google.protobuf import any_pb2
from google.protobuf import duration_pb2
Expand All @@ -37,6 +38,7 @@

_shared_modules = [
iam_policy_pb2,
options_pb2,
policy_pb2,
any_pb2,
duration_pb2,
Expand Down
6 changes: 3 additions & 3 deletions tasks/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


LOCAL_DEPS = (os.path.join("..", "api_core"), os.path.join("..", "core"))

BLACK_VERSION = "black==19.3b0"
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

if os.path.exists("samples"):
Expand All @@ -38,7 +38,7 @@ def lint(session):
Returns a failure if the linters find linting errors or sufficiently
serious code quality issues.
"""
session.install("flake8", "black", *LOCAL_DEPS)
session.install("flake8", BLACK_VERSION, *LOCAL_DEPS)
session.run("black", "--check", *BLACK_PATHS)
session.run("flake8", "google", "tests")

Expand All @@ -53,7 +53,7 @@ def blacken(session):
That run uses an image that doesn't have 3.6 installed. Before updating this
check the state of the `gcp_ubuntu_config` we use for that Kokoro run.
"""
session.install("black")
session.install(BLACK_VERSION)
session.run("black", *BLACK_PATHS)


Expand Down
10 changes: 5 additions & 5 deletions tasks/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-06-28T12:37:20.592791Z",
"updateTime": "2019-07-03T12:41:23.330673Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.29.2",
"dockerImage": "googleapis/artman@sha256:45263333b058a4b3c26a8b7680a2710f43eae3d250f791a6cb66423991dcb2df"
"version": "0.29.3",
"dockerImage": "googleapis/artman@sha256:8900f94a81adaab0238965aa8a7b3648791f4f3a95ee65adc6a56cfcc3753101"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "84c8ad4e52f8eec8f08a60636cfa597b86969b5c",
"internalRef": "255474859"
"sha": "69916b6ffbb7717fa009033351777d0c9909fb79",
"internalRef": "256241904"
}
},
{
Expand Down