Skip to content

Commit

Permalink
feat(recommender): regenerate
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 committed Feb 6, 2020
1 parent 71705da commit 2213b69
Show file tree
Hide file tree
Showing 27 changed files with 403 additions and 537 deletions.
2 changes: 1 addition & 1 deletion recommender/google/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion recommender/google/cloud/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion recommender/google/cloud/recommender.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion recommender/google/cloud/recommender_v1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions recommender/google/cloud/recommender_v1/gapic/enums.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,8 +21,8 @@

class NullValue(enum.IntEnum):
"""
``NullValue`` is a singleton enumeration to represent the null value
for the ``Value`` type union.
``NullValue`` is a singleton enumeration to represent the null value for
the ``Value`` type union.
The JSON representation for ``NullValue`` is JSON ``null``.
Expand Down
60 changes: 25 additions & 35 deletions recommender/google/cloud/recommender_v1/gapic/recommender_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -81,12 +81,7 @@ def from_service_account_file(cls, filename, *args, **kwargs):

@classmethod
def recommendation_path(cls, project, location, recommender, recommendation):
"""DEPRECATED. Return a fully-qualified recommendation string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
"""Return a fully-qualified recommendation string."""
return google.api_core.path_template.expand(
"projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}",
project=project,
Expand All @@ -97,12 +92,7 @@ def recommendation_path(cls, project, location, recommender, recommendation):

@classmethod
def recommender_path(cls, project, location, recommender):
"""DEPRECATED. Return a fully-qualified recommender string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
"""Return a fully-qualified recommender string."""
return google.api_core.path_template.expand(
"projects/{project}/locations/{location}/recommenders/{recommender}",
project=project,
Expand Down Expand Up @@ -234,7 +224,7 @@ def list_recommendations(
):
"""
Lists recommendations for a Cloud project. Requires the
recommender.*.list IAM permission for the specified recommender.
recommender.\*.list IAM permission for the specified recommender.
Example:
>>> from google.cloud import recommender_v1
Expand Down Expand Up @@ -263,7 +253,7 @@ def list_recommendations(
1.
"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]",
"projects/[PROJECT\_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER\_ID]",
LOCATION here refers to GCP Locations:
https://cloud.google.com/about/locations/
Expand All @@ -272,9 +262,9 @@ def list_recommendations(
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
filter_ (str): Filter expression to restrict the recommendations returned.
Supported filter fields: state_info.state Eg:
\`state_info.state:"DISMISSED" or state_info.state:"FAILED"
filter_ (str): Filter expression to restrict the recommendations returned. Supported
filter fields: state\_info.state Eg: \`state\_info.state:"DISMISSED" or
state\_info.state:"FAILED"
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
Expand Down Expand Up @@ -347,8 +337,8 @@ def get_recommendation(
metadata=None,
):
"""
Gets the requested recommendation. Requires the recommender.*.get
IAM permission for the specified recommender.
Gets the requested recommendation. Requires the recommender.\*.get IAM
permission for the specified recommender.
Example:
>>> from google.cloud import recommender_v1
Expand Down Expand Up @@ -419,15 +409,15 @@ def mark_recommendation_claimed(
metadata=None,
):
"""
Mark the Recommendation State as Claimed. Users can use this method
to indicate to the Recommender API that they are starting to apply the
Mark the Recommendation State as Claimed. Users can use this method to
indicate to the Recommender API that they are starting to apply the
recommendation themselves. This stops the recommendation content from
being updated.
MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
SUCCEEDED, FAILED, or ACTIVE state.
Requires the recommender.*.update IAM permission for the specified
Requires the recommender.\*.update IAM permission for the specified
recommender.
Example:
Expand All @@ -447,8 +437,8 @@ def mark_recommendation_claimed(
etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking.
state_metadata (dict[str -> str]): State properties to include with this state. Overwrites any existing
``state_metadata``. Keys must match the regex
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9_./-]{0,255}$/``.
``/^[a-z0-9][a-z0-9\_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9\_./-]{0,255}$/``.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
Expand Down Expand Up @@ -511,15 +501,15 @@ def mark_recommendation_succeeded(
metadata=None,
):
"""
Mark the Recommendation State as Succeeded. Users can use this
method to indicate to the Recommender API that they have applied the
Mark the Recommendation State as Succeeded. Users can use this method to
indicate to the Recommender API that they have applied the
recommendation themselves, and the operation was successful. This stops
the recommendation content from being updated.
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE,
CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified
Requires the recommender.\*.update IAM permission for the specified
recommender.
Example:
Expand All @@ -539,8 +529,8 @@ def mark_recommendation_succeeded(
etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking.
state_metadata (dict[str -> str]): State properties to include with this state. Overwrites any existing
``state_metadata``. Keys must match the regex
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9_./-]{0,255}$/``.
``/^[a-z0-9][a-z0-9\_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9\_./-]{0,255}$/``.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
Expand Down Expand Up @@ -603,15 +593,15 @@ def mark_recommendation_failed(
metadata=None,
):
"""
Mark the Recommendation State as Failed. Users can use this method
to indicate to the Recommender API that they have applied the
Mark the Recommendation State as Failed. Users can use this method to
indicate to the Recommender API that they have applied the
recommendation themselves, and the operation failed. This stops the
recommendation content from being updated.
MarkRecommendationFailed can be applied to recommendations in ACTIVE,
CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified
Requires the recommender.\*.update IAM permission for the specified
recommender.
Example:
Expand All @@ -631,8 +621,8 @@ def mark_recommendation_failed(
etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking.
state_metadata (dict[str -> str]): State properties to include with this state. Overwrites any existing
``state_metadata``. Keys must match the regex
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9_./-]{0,255}$/``.
``/^[a-z0-9][a-z0-9\_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9\_./-]{0,255}$/``.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

config = {
"interfaces": {
"google.cloud.recommender.v1.Recommender": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -112,7 +112,7 @@ def list_recommendations(self):
"""Return the gRPC stub for :meth:`RecommenderClient.list_recommendations`.
Lists recommendations for a Cloud project. Requires the
recommender.*.list IAM permission for the specified recommender.
recommender.\*.list IAM permission for the specified recommender.
Returns:
Callable: A callable which accepts the appropriate
Expand All @@ -125,8 +125,8 @@ def list_recommendations(self):
def get_recommendation(self):
"""Return the gRPC stub for :meth:`RecommenderClient.get_recommendation`.
Gets the requested recommendation. Requires the recommender.*.get
IAM permission for the specified recommender.
Gets the requested recommendation. Requires the recommender.\*.get IAM
permission for the specified recommender.
Returns:
Callable: A callable which accepts the appropriate
Expand All @@ -139,15 +139,15 @@ def get_recommendation(self):
def mark_recommendation_claimed(self):
"""Return the gRPC stub for :meth:`RecommenderClient.mark_recommendation_claimed`.
Mark the Recommendation State as Claimed. Users can use this method
to indicate to the Recommender API that they are starting to apply the
Mark the Recommendation State as Claimed. Users can use this method to
indicate to the Recommender API that they are starting to apply the
recommendation themselves. This stops the recommendation content from
being updated.
MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
SUCCEEDED, FAILED, or ACTIVE state.
Requires the recommender.*.update IAM permission for the specified
Requires the recommender.\*.update IAM permission for the specified
recommender.
Returns:
Expand All @@ -161,15 +161,15 @@ def mark_recommendation_claimed(self):
def mark_recommendation_succeeded(self):
"""Return the gRPC stub for :meth:`RecommenderClient.mark_recommendation_succeeded`.
Mark the Recommendation State as Succeeded. Users can use this
method to indicate to the Recommender API that they have applied the
Mark the Recommendation State as Succeeded. Users can use this method to
indicate to the Recommender API that they have applied the
recommendation themselves, and the operation was successful. This stops
the recommendation content from being updated.
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE,
CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified
Requires the recommender.\*.update IAM permission for the specified
recommender.
Returns:
Expand All @@ -183,15 +183,15 @@ def mark_recommendation_succeeded(self):
def mark_recommendation_failed(self):
"""Return the gRPC stub for :meth:`RecommenderClient.mark_recommendation_failed`.
Mark the Recommendation State as Failed. Users can use this method
to indicate to the Recommender API that they have applied the
Mark the Recommendation State as Failed. Users can use this method to
indicate to the Recommender API that they have applied the
recommendation themselves, and the operation failed. This stops the
recommendation content from being updated.
MarkRecommendationFailed can be applied to recommendations in ACTIVE,
CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified
Requires the recommender.\*.update IAM permission for the specified
recommender.
Returns:
Expand Down
Loading

0 comments on commit 2213b69

Please sign in to comment.