Skip to content

Commit 2213b69

Browse files
committed
feat(recommender): regenerate
1 parent 71705da commit 2213b69

27 files changed

+403
-537
lines changed

recommender/google/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

recommender/google/cloud/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

recommender/google/cloud/recommender.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

recommender/google/cloud/recommender_v1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

recommender/google/cloud/recommender_v1/gapic/enums.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@
2121

2222
class NullValue(enum.IntEnum):
2323
"""
24-
``NullValue`` is a singleton enumeration to represent the null value
25-
for the ``Value`` type union.
24+
``NullValue`` is a singleton enumeration to represent the null value for
25+
the ``Value`` type union.
2626
2727
The JSON representation for ``NullValue`` is JSON ``null``.
2828

recommender/google/cloud/recommender_v1/gapic/recommender_client.py

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -81,12 +81,7 @@ def from_service_account_file(cls, filename, *args, **kwargs):
8181

8282
@classmethod
8383
def recommendation_path(cls, project, location, recommender, recommendation):
84-
"""DEPRECATED. Return a fully-qualified recommendation string."""
85-
warnings.warn(
86-
"Resource name helper functions are deprecated.",
87-
PendingDeprecationWarning,
88-
stacklevel=1,
89-
)
84+
"""Return a fully-qualified recommendation string."""
9085
return google.api_core.path_template.expand(
9186
"projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}",
9287
project=project,
@@ -97,12 +92,7 @@ def recommendation_path(cls, project, location, recommender, recommendation):
9792

9893
@classmethod
9994
def recommender_path(cls, project, location, recommender):
100-
"""DEPRECATED. Return a fully-qualified recommender string."""
101-
warnings.warn(
102-
"Resource name helper functions are deprecated.",
103-
PendingDeprecationWarning,
104-
stacklevel=1,
105-
)
95+
"""Return a fully-qualified recommender string."""
10696
return google.api_core.path_template.expand(
10797
"projects/{project}/locations/{location}/recommenders/{recommender}",
10898
project=project,
@@ -234,7 +224,7 @@ def list_recommendations(
234224
):
235225
"""
236226
Lists recommendations for a Cloud project. Requires the
237-
recommender.*.list IAM permission for the specified recommender.
227+
recommender.\*.list IAM permission for the specified recommender.
238228
239229
Example:
240230
>>> from google.cloud import recommender_v1
@@ -263,7 +253,7 @@ def list_recommendations(
263253
264254
1.
265255
266-
"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]",
256+
"projects/[PROJECT\_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER\_ID]",
267257
268258
LOCATION here refers to GCP Locations:
269259
https://cloud.google.com/about/locations/
@@ -272,9 +262,9 @@ def list_recommendations(
272262
resource, this parameter does not affect the return value. If page
273263
streaming is performed per-page, this determines the maximum number
274264
of resources in a page.
275-
filter_ (str): Filter expression to restrict the recommendations returned.
276-
Supported filter fields: state_info.state Eg:
277-
\`state_info.state:"DISMISSED" or state_info.state:"FAILED"
265+
filter_ (str): Filter expression to restrict the recommendations returned. Supported
266+
filter fields: state\_info.state Eg: \`state\_info.state:"DISMISSED" or
267+
state\_info.state:"FAILED"
278268
retry (Optional[google.api_core.retry.Retry]): A retry object used
279269
to retry requests. If ``None`` is specified, requests will
280270
be retried using a default configuration.
@@ -347,8 +337,8 @@ def get_recommendation(
347337
metadata=None,
348338
):
349339
"""
350-
Gets the requested recommendation. Requires the recommender.*.get
351-
IAM permission for the specified recommender.
340+
Gets the requested recommendation. Requires the recommender.\*.get IAM
341+
permission for the specified recommender.
352342
353343
Example:
354344
>>> from google.cloud import recommender_v1
@@ -419,15 +409,15 @@ def mark_recommendation_claimed(
419409
metadata=None,
420410
):
421411
"""
422-
Mark the Recommendation State as Claimed. Users can use this method
423-
to indicate to the Recommender API that they are starting to apply the
412+
Mark the Recommendation State as Claimed. Users can use this method to
413+
indicate to the Recommender API that they are starting to apply the
424414
recommendation themselves. This stops the recommendation content from
425415
being updated.
426416
427417
MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
428418
SUCCEEDED, FAILED, or ACTIVE state.
429419
430-
Requires the recommender.*.update IAM permission for the specified
420+
Requires the recommender.\*.update IAM permission for the specified
431421
recommender.
432422
433423
Example:
@@ -447,8 +437,8 @@ def mark_recommendation_claimed(
447437
etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking.
448438
state_metadata (dict[str -> str]): State properties to include with this state. Overwrites any existing
449439
``state_metadata``. Keys must match the regex
450-
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
451-
``/^[a-zA-Z0-9_./-]{0,255}$/``.
440+
``/^[a-z0-9][a-z0-9\_.-]{0,62}$/``. Values must match the regex
441+
``/^[a-zA-Z0-9\_./-]{0,255}$/``.
452442
retry (Optional[google.api_core.retry.Retry]): A retry object used
453443
to retry requests. If ``None`` is specified, requests will
454444
be retried using a default configuration.
@@ -511,15 +501,15 @@ def mark_recommendation_succeeded(
511501
metadata=None,
512502
):
513503
"""
514-
Mark the Recommendation State as Succeeded. Users can use this
515-
method to indicate to the Recommender API that they have applied the
504+
Mark the Recommendation State as Succeeded. Users can use this method to
505+
indicate to the Recommender API that they have applied the
516506
recommendation themselves, and the operation was successful. This stops
517507
the recommendation content from being updated.
518508
519509
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE,
520510
CLAIMED, SUCCEEDED, or FAILED state.
521511
522-
Requires the recommender.*.update IAM permission for the specified
512+
Requires the recommender.\*.update IAM permission for the specified
523513
recommender.
524514
525515
Example:
@@ -539,8 +529,8 @@ def mark_recommendation_succeeded(
539529
etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking.
540530
state_metadata (dict[str -> str]): State properties to include with this state. Overwrites any existing
541531
``state_metadata``. Keys must match the regex
542-
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
543-
``/^[a-zA-Z0-9_./-]{0,255}$/``.
532+
``/^[a-z0-9][a-z0-9\_.-]{0,62}$/``. Values must match the regex
533+
``/^[a-zA-Z0-9\_./-]{0,255}$/``.
544534
retry (Optional[google.api_core.retry.Retry]): A retry object used
545535
to retry requests. If ``None`` is specified, requests will
546536
be retried using a default configuration.
@@ -603,15 +593,15 @@ def mark_recommendation_failed(
603593
metadata=None,
604594
):
605595
"""
606-
Mark the Recommendation State as Failed. Users can use this method
607-
to indicate to the Recommender API that they have applied the
596+
Mark the Recommendation State as Failed. Users can use this method to
597+
indicate to the Recommender API that they have applied the
608598
recommendation themselves, and the operation failed. This stops the
609599
recommendation content from being updated.
610600
611601
MarkRecommendationFailed can be applied to recommendations in ACTIVE,
612602
CLAIMED, SUCCEEDED, or FAILED state.
613603
614-
Requires the recommender.*.update IAM permission for the specified
604+
Requires the recommender.\*.update IAM permission for the specified
615605
recommender.
616606
617607
Example:
@@ -631,8 +621,8 @@ def mark_recommendation_failed(
631621
etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking.
632622
state_metadata (dict[str -> str]): State properties to include with this state. Overwrites any existing
633623
``state_metadata``. Keys must match the regex
634-
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
635-
``/^[a-zA-Z0-9_./-]{0,255}$/``.
624+
``/^[a-z0-9][a-z0-9\_.-]{0,62}$/``. Values must match the regex
625+
``/^[a-zA-Z0-9\_./-]{0,255}$/``.
636626
retry (Optional[google.api_core.retry.Retry]): A retry object used
637627
to retry requests. If ``None`` is specified, requests will
638628
be retried using a default configuration.

recommender/google/cloud/recommender_v1/gapic/recommender_client_config.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
# Copyright 2020 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
config = {
162
"interfaces": {
173
"google.cloud.recommender.v1.Recommender": {

recommender/google/cloud/recommender_v1/gapic/transports/recommender_grpc_transport.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -112,7 +112,7 @@ def list_recommendations(self):
112112
"""Return the gRPC stub for :meth:`RecommenderClient.list_recommendations`.
113113
114114
Lists recommendations for a Cloud project. Requires the
115-
recommender.*.list IAM permission for the specified recommender.
115+
recommender.\*.list IAM permission for the specified recommender.
116116
117117
Returns:
118118
Callable: A callable which accepts the appropriate
@@ -125,8 +125,8 @@ def list_recommendations(self):
125125
def get_recommendation(self):
126126
"""Return the gRPC stub for :meth:`RecommenderClient.get_recommendation`.
127127
128-
Gets the requested recommendation. Requires the recommender.*.get
129-
IAM permission for the specified recommender.
128+
Gets the requested recommendation. Requires the recommender.\*.get IAM
129+
permission for the specified recommender.
130130
131131
Returns:
132132
Callable: A callable which accepts the appropriate
@@ -139,15 +139,15 @@ def get_recommendation(self):
139139
def mark_recommendation_claimed(self):
140140
"""Return the gRPC stub for :meth:`RecommenderClient.mark_recommendation_claimed`.
141141
142-
Mark the Recommendation State as Claimed. Users can use this method
143-
to indicate to the Recommender API that they are starting to apply the
142+
Mark the Recommendation State as Claimed. Users can use this method to
143+
indicate to the Recommender API that they are starting to apply the
144144
recommendation themselves. This stops the recommendation content from
145145
being updated.
146146
147147
MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
148148
SUCCEEDED, FAILED, or ACTIVE state.
149149
150-
Requires the recommender.*.update IAM permission for the specified
150+
Requires the recommender.\*.update IAM permission for the specified
151151
recommender.
152152
153153
Returns:
@@ -161,15 +161,15 @@ def mark_recommendation_claimed(self):
161161
def mark_recommendation_succeeded(self):
162162
"""Return the gRPC stub for :meth:`RecommenderClient.mark_recommendation_succeeded`.
163163
164-
Mark the Recommendation State as Succeeded. Users can use this
165-
method to indicate to the Recommender API that they have applied the
164+
Mark the Recommendation State as Succeeded. Users can use this method to
165+
indicate to the Recommender API that they have applied the
166166
recommendation themselves, and the operation was successful. This stops
167167
the recommendation content from being updated.
168168
169169
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE,
170170
CLAIMED, SUCCEEDED, or FAILED state.
171171
172-
Requires the recommender.*.update IAM permission for the specified
172+
Requires the recommender.\*.update IAM permission for the specified
173173
recommender.
174174
175175
Returns:
@@ -183,15 +183,15 @@ def mark_recommendation_succeeded(self):
183183
def mark_recommendation_failed(self):
184184
"""Return the gRPC stub for :meth:`RecommenderClient.mark_recommendation_failed`.
185185
186-
Mark the Recommendation State as Failed. Users can use this method
187-
to indicate to the Recommender API that they have applied the
186+
Mark the Recommendation State as Failed. Users can use this method to
187+
indicate to the Recommender API that they have applied the
188188
recommendation themselves, and the operation failed. This stops the
189189
recommendation content from being updated.
190190
191191
MarkRecommendationFailed can be applied to recommendations in ACTIVE,
192192
CLAIMED, SUCCEEDED, or FAILED state.
193193
194-
Requires the recommender.*.update IAM permission for the specified
194+
Requires the recommender.\*.update IAM permission for the specified
195195
recommender.
196196
197197
Returns:

0 commit comments

Comments
 (0)