Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

feat: add support for v1 #15

Merged
merged 2 commits into from Mar 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .kokoro/build.sh
@@ -1,5 +1,4 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
15 changes: 15 additions & 0 deletions .kokoro/publish-docs.sh
@@ -1,3 +1,18 @@
#!/bin/bash
# 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
#
# 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.

#!/bin/bash

set -eo pipefail
Expand Down
15 changes: 15 additions & 0 deletions .kokoro/release.sh
@@ -1,3 +1,18 @@
#!/bin/bash
# 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
#
# 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.

#!/bin/bash

set -eo pipefail
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Expand Up @@ -143,7 +143,7 @@ Running System Tests
- To run system tests, you can execute::

$ nox -s system-3.7
$ nox -s system-2.7
$ nox -s system-2.7

.. note::

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -20,7 +20,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath(".."))

__version__ = "0.1.0"
__version__ = ""

# -- General configuration ------------------------------------------------

Expand Down
6 changes: 6 additions & 0 deletions docs/gapic/v1/api.rst
@@ -0,0 +1,6 @@
Client for Secret Manager API
=============================

.. automodule:: google.cloud.secretmanager_v1
:members:
:inherited-members:
5 changes: 5 additions & 0 deletions docs/gapic/v1/types.rst
@@ -0,0 +1,5 @@
Types for Secret Manager API Client
===================================

.. automodule:: google.cloud.secretmanager_v1.types
:members:
14 changes: 11 additions & 3 deletions docs/index.rst
@@ -1,7 +1,15 @@
.. include:: README.rst

Api Reference
-------------
v1 Api Reference
----------------
.. toctree::
:maxdepth: 2

gapic/v1/api
gapic/v1/types

v1beta1 Api Reference
---------------------
.. toctree::
:maxdepth: 2

Expand All @@ -13,4 +21,4 @@ Changelog
.. toctree::
:maxdepth: 2

changelog
changelog
2 changes: 1 addition & 1 deletion google/__init__.py
@@ -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 google/cloud/__init__.py
@@ -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
8 changes: 4 additions & 4 deletions google/cloud/secretmanager.py
@@ -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 @@ -17,9 +17,9 @@

from __future__ import absolute_import

from google.cloud.secretmanager_v1beta1 import SecretManagerServiceClient
from google.cloud.secretmanager_v1beta1 import enums
from google.cloud.secretmanager_v1beta1 import types
from google.cloud.secretmanager_v1 import SecretManagerServiceClient
from google.cloud.secretmanager_v1 import enums
from google.cloud.secretmanager_v1 import types


__all__ = ("enums", "types", "SecretManagerServiceClient")
43 changes: 43 additions & 0 deletions google/cloud/secretmanager_v1/__init__.py
@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
#
# 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
#
# 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.secretmanager_v1 import types
from google.cloud.secretmanager_v1.gapic import enums
from google.cloud.secretmanager_v1.gapic import secret_manager_service_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 SecretManagerServiceClient(
secret_manager_service_client.SecretManagerServiceClient
):
__doc__ = secret_manager_service_client.SecretManagerServiceClient.__doc__
enums = enums


__all__ = ("enums", "types", "SecretManagerServiceClient")
Empty file.
39 changes: 39 additions & 0 deletions google/cloud/secretmanager_v1/gapic/enums.py
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
#
# 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
#
# 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 SecretVersion(object):
class State(enum.IntEnum):
"""
The state of a ``SecretVersion``, indicating if it can be accessed.

Attributes:
STATE_UNSPECIFIED (int): Not specified. This value is unused and invalid.
ENABLED (int): The ``SecretVersion`` may be accessed.
DISABLED (int): The ``SecretVersion`` may not be accessed, but the secret data is
still available and can be placed back into the ``ENABLED`` state.
DESTROYED (int): The ``SecretVersion`` is destroyed and the secret data is no longer
stored. A version may not leave this state once entered.
"""

STATE_UNSPECIFIED = 0
ENABLED = 1
DISABLED = 2
DESTROYED = 3