-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(recommender): add v1, set release level to beta (#10170)
- Loading branch information
1 parent
559047a
commit f3bc127
Showing
33 changed files
with
4,797 additions
and
316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Client for Recommender API | ||
========================== | ||
|
||
.. automodule:: google.cloud.recommender_v1 | ||
:members: | ||
:inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Types for Recommender API Client | ||
================================ | ||
|
||
.. automodule:: google.cloud.recommender_v1.types | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
packages/google-cloud-recommender/google/cloud/recommender_v1/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright 2019 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 | ||
# | ||
# https://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. | ||
|
||
|
||
from __future__ import absolute_import | ||
import sys | ||
import warnings | ||
|
||
from google.cloud.recommender_v1 import types | ||
from google.cloud.recommender_v1.gapic import enums | ||
from google.cloud.recommender_v1.gapic import recommender_client | ||
|
||
|
||
if sys.version_info[:2] == (2, 7): | ||
message = ( | ||
"A future version of this library will drop support for Python 2.7." | ||
"More details about Python 2 support for Google Cloud Client Libraries" | ||
"can be found at https://cloud.google.com/python/docs/python2-sunset/" | ||
) | ||
warnings.warn(message, DeprecationWarning) | ||
|
||
|
||
class RecommenderClient(recommender_client.RecommenderClient): | ||
__doc__ = recommender_client.RecommenderClient.__doc__ | ||
enums = enums | ||
|
||
|
||
__all__ = ("enums", "types", "RecommenderClient") |
Empty file.
90 changes: 90 additions & 0 deletions
90
packages/google-cloud-recommender/google/cloud/recommender_v1/gapic/enums.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright 2019 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 | ||
# | ||
# https://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. | ||
|
||
"""Wrappers for protocol buffer enum types.""" | ||
|
||
import enum | ||
|
||
|
||
class NullValue(enum.IntEnum): | ||
""" | ||
``NullValue`` is a singleton enumeration to represent the null value | ||
for the ``Value`` type union. | ||
The JSON representation for ``NullValue`` is JSON ``null``. | ||
Attributes: | ||
NULL_VALUE (int): Null value. | ||
""" | ||
|
||
NULL_VALUE = 0 | ||
|
||
|
||
class Impact(object): | ||
class Category(enum.IntEnum): | ||
""" | ||
The category of the impact. | ||
Attributes: | ||
CATEGORY_UNSPECIFIED (int): Default unspecified category. Don't use directly. | ||
COST (int): Indicates a potential increase or decrease in cost. | ||
SECURITY (int): Indicates a potential increase or decrease in security. | ||
PERFORMANCE (int): Indicates a potential increase or decrease in performance. | ||
MANAGEABILITY (int): Indicates a potential increase or decrease in manageability. | ||
""" | ||
|
||
CATEGORY_UNSPECIFIED = 0 | ||
COST = 1 | ||
SECURITY = 2 | ||
PERFORMANCE = 3 | ||
MANAGEABILITY = 4 | ||
|
||
|
||
class RecommendationStateInfo(object): | ||
class State(enum.IntEnum): | ||
""" | ||
Represents Recommendation State | ||
Attributes: | ||
STATE_UNSPECIFIED (int): Default state. Don't use directly. | ||
ACTIVE (int): Recommendation is active and can be applied. Recommendations content can | ||
be updated by Google. | ||
ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. | ||
CLAIMED (int): Recommendation is in claimed state. Recommendations content is | ||
immutable and cannot be updated by Google. | ||
CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. | ||
SUCCEEDED (int): Recommendation is in succeeded state. Recommendations content is | ||
immutable and cannot be updated by Google. | ||
SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED. | ||
FAILED (int): Recommendation is in failed state. Recommendations content is immutable | ||
and cannot be updated by Google. | ||
FAILED recommendations can be marked as SUCCEEDED, or FAILED. | ||
DISMISSED (int): Recommendation is in dismissed state. Recommendation content can be | ||
updated by Google. | ||
DISMISSED recommendations can be marked as ACTIVE. | ||
""" | ||
|
||
STATE_UNSPECIFIED = 0 | ||
ACTIVE = 1 | ||
CLAIMED = 6 | ||
SUCCEEDED = 3 | ||
FAILED = 4 | ||
DISMISSED = 5 |
Oops, something went wrong.