From 693d570fd0aa7cb1287329fd233e266219302ec3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 20 Jan 2023 15:43:04 -0500 Subject: [PATCH 1/2] docs: Add documentation for enums (#156) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Add documentation for enums fix: Add context manager return types chore: Update gapic-generator-python to v1.8.1 PiperOrigin-RevId: 503210727 Source-Link: https://github.com/googleapis/googleapis/commit/a391fd1dac18dfdfa00c18c8404f2c3a6ff8e98e Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * work around docs issue Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- .../services/environments/client.py | 2 +- .../services/image_versions/client.py | 2 +- .../airflow/service_v1/types/environments.py | 57 ++++++++++++++++++- .../airflow/service_v1/types/operations.py | 38 ++++++++++++- .../services/environments/client.py | 2 +- .../services/image_versions/client.py | 2 +- .../service_v1beta1/types/environments.py | 57 ++++++++++++++++++- .../service_v1beta1/types/operations.py | 36 +++++++++++- ...loud.orchestration.airflow.service.v1.json | 2 +- ...orchestration.airflow.service.v1beta1.json | 2 +- 10 files changed, 186 insertions(+), 14 deletions(-) diff --git a/google/cloud/orchestration/airflow/service_v1/services/environments/client.py b/google/cloud/orchestration/airflow/service_v1/services/environments/client.py index 793f734..1c00fdc 100644 --- a/google/cloud/orchestration/airflow/service_v1/services/environments/client.py +++ b/google/cloud/orchestration/airflow/service_v1/services/environments/client.py @@ -1424,7 +1424,7 @@ def sample_load_snapshot(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "EnvironmentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/orchestration/airflow/service_v1/services/image_versions/client.py b/google/cloud/orchestration/airflow/service_v1/services/image_versions/client.py index 85bdd6c..464284e 100644 --- a/google/cloud/orchestration/airflow/service_v1/services/image_versions/client.py +++ b/google/cloud/orchestration/airflow/service_v1/services/image_versions/client.py @@ -534,7 +534,7 @@ def sample_list_image_versions(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ImageVersionsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/orchestration/airflow/service_v1/types/environments.py b/google/cloud/orchestration/airflow/service_v1/types/environments.py index c1cf78f..b5b55fe 100644 --- a/google/cloud/orchestration/airflow/service_v1/types/environments.py +++ b/google/cloud/orchestration/airflow/service_v1/types/environments.py @@ -558,7 +558,18 @@ class EnvironmentConfig(proto.Message): """ class EnvironmentSize(proto.Enum): - r"""The size of the Cloud Composer environment.""" + r"""The size of the Cloud Composer environment. + + Values: + ENVIRONMENT_SIZE_UNSPECIFIED (0): + The size of the environment is unspecified. + ENVIRONMENT_SIZE_SMALL (1): + The environment size is small. + ENVIRONMENT_SIZE_MEDIUM (2): + The environment size is medium. + ENVIRONMENT_SIZE_LARGE (3): + The environment size is large. + """ ENVIRONMENT_SIZE_UNSPECIFIED = 0 ENVIRONMENT_SIZE_SMALL = 1 ENVIRONMENT_SIZE_MEDIUM = 2 @@ -1252,6 +1263,18 @@ class ConnectionType(proto.Enum): r"""Represents connection type between Composer environment in Customer Project and the corresponding Tenant project, from a predefined list of available connection modes. + + Values: + CONNECTION_TYPE_UNSPECIFIED (0): + No specific connection type was requested, so + the environment uses the default value + corresponding to the rest of its configuration. + VPC_PEERING (1): + Requests the use of VPC peerings for + connecting the Customer and Tenant projects. + PRIVATE_SERVICE_CONNECT (2): + Requests the use of Private Service Connect + for connecting the Customer and Tenant projects. """ CONNECTION_TYPE_UNSPECIFIED = 0 VPC_PEERING = 1 @@ -1654,7 +1677,28 @@ class Environment(proto.Message): """ class State(proto.Enum): - r"""State of the environment.""" + r"""State of the environment. + + Values: + STATE_UNSPECIFIED (0): + The state of the environment is unknown. + CREATING (1): + The environment is in the process of being + created. + RUNNING (2): + The environment is currently running and + healthy. It is ready for use. + UPDATING (3): + The environment is being updated. It remains + usable but cannot receive additional update + requests or be deleted at this time. + DELETING (4): + The environment is undergoing deletion. It + cannot be used. + ERROR (5): + The environment has encountered an error and + cannot be used. + """ STATE_UNSPECIFIED = 0 CREATING = 1 RUNNING = 2 @@ -1724,6 +1768,15 @@ class CheckUpgradeResponse(proto.Message): class ConflictResult(proto.Enum): r"""Whether there were python modules conflict during image build. + + Values: + CONFLICT_RESULT_UNSPECIFIED (0): + It is unknown whether build had conflicts or + not. + CONFLICT (1): + There were python packages conflicts. + NO_CONFLICT (2): + There were no python packages conflicts. """ CONFLICT_RESULT_UNSPECIFIED = 0 CONFLICT = 1 diff --git a/google/cloud/orchestration/airflow/service_v1/types/operations.py b/google/cloud/orchestration/airflow/service_v1/types/operations.py index 36db2ce..ebc12c3 100644 --- a/google/cloud/orchestration/airflow/service_v1/types/operations.py +++ b/google/cloud/orchestration/airflow/service_v1/types/operations.py @@ -53,7 +53,24 @@ class OperationMetadata(proto.Message): """ class State(proto.Enum): - r"""An enum describing the overall state of an operation.""" + r"""An enum describing the overall state of an operation. + + Values: + STATE_UNSPECIFIED (0): + Unused. + PENDING (1): + The operation has been created but is not yet + started. + RUNNING (2): + The operation is underway. + SUCCEEDED (3): + The operation completed successfully. + SUCCESSFUL (3): + No description available. + FAILED (4): + The operation is no longer running but did + not succeed. + """ _pb_options = {"allow_alias": True} STATE_UNSPECIFIED = 0 PENDING = 1 @@ -63,7 +80,24 @@ class State(proto.Enum): FAILED = 4 class Type(proto.Enum): - r"""Type of longrunning operation.""" + r"""Type of longrunning operation. + + Values: + TYPE_UNSPECIFIED (0): + Unused. + CREATE (1): + A resource creation operation. + DELETE (2): + A resource deletion operation. + UPDATE (3): + A resource update operation. + CHECK (4): + A resource check operation. + SAVE_SNAPSHOT (5): + Saves snapshot of the resource operation. + LOAD_SNAPSHOT (6): + Loads snapshot of the resource operation. + """ TYPE_UNSPECIFIED = 0 CREATE = 1 DELETE = 2 diff --git a/google/cloud/orchestration/airflow/service_v1beta1/services/environments/client.py b/google/cloud/orchestration/airflow/service_v1beta1/services/environments/client.py index 66e4596..0185750 100644 --- a/google/cloud/orchestration/airflow/service_v1beta1/services/environments/client.py +++ b/google/cloud/orchestration/airflow/service_v1beta1/services/environments/client.py @@ -1659,7 +1659,7 @@ def sample_load_snapshot(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "EnvironmentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/orchestration/airflow/service_v1beta1/services/image_versions/client.py b/google/cloud/orchestration/airflow/service_v1beta1/services/image_versions/client.py index 51692ad..e0d4c8d 100644 --- a/google/cloud/orchestration/airflow/service_v1beta1/services/image_versions/client.py +++ b/google/cloud/orchestration/airflow/service_v1beta1/services/image_versions/client.py @@ -536,7 +536,7 @@ def sample_list_image_versions(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ImageVersionsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/orchestration/airflow/service_v1beta1/types/environments.py b/google/cloud/orchestration/airflow/service_v1beta1/types/environments.py index fadb9ad..06864af 100644 --- a/google/cloud/orchestration/airflow/service_v1beta1/types/environments.py +++ b/google/cloud/orchestration/airflow/service_v1beta1/types/environments.py @@ -720,7 +720,18 @@ class EnvironmentConfig(proto.Message): """ class EnvironmentSize(proto.Enum): - r"""The size of the Cloud Composer environment.""" + r"""The size of the Cloud Composer environment. + + Values: + ENVIRONMENT_SIZE_UNSPECIFIED (0): + The size of the environment is unspecified. + ENVIRONMENT_SIZE_SMALL (1): + The environment size is small. + ENVIRONMENT_SIZE_MEDIUM (2): + The environment size is medium. + ENVIRONMENT_SIZE_LARGE (3): + The environment size is large. + """ ENVIRONMENT_SIZE_UNSPECIFIED = 0 ENVIRONMENT_SIZE_SMALL = 1 ENVIRONMENT_SIZE_MEDIUM = 2 @@ -1321,6 +1332,18 @@ class ConnectionType(proto.Enum): r"""Represents connection type between Composer environment in Customer Project and the corresponding Tenant project, from a predefined list of available connection modes. + + Values: + CONNECTION_TYPE_UNSPECIFIED (0): + No specific connection type was requested, so + the environment uses the default value + corresponding to the rest of its configuration. + VPC_PEERING (1): + Requests the use of VPC peerings for + connecting the Customer and Tenant projects. + PRIVATE_SERVICE_CONNECT (2): + Requests the use of Private Service Connect + for connecting the Customer and Tenant projects. """ CONNECTION_TYPE_UNSPECIFIED = 0 VPC_PEERING = 1 @@ -1882,7 +1905,28 @@ class Environment(proto.Message): """ class State(proto.Enum): - r"""State of the environment.""" + r"""State of the environment. + + Values: + STATE_UNSPECIFIED (0): + The state of the environment is unknown. + CREATING (1): + The environment is in the process of being + created. + RUNNING (2): + The environment is currently running and + healthy. It is ready for use. + UPDATING (3): + The environment is being updated. It remains + usable but cannot receive additional update + requests or be deleted at this time. + DELETING (4): + The environment is undergoing deletion. It + cannot be used. + ERROR (5): + The environment has encountered an error and + cannot be used. + """ STATE_UNSPECIFIED = 0 CREATING = 1 RUNNING = 2 @@ -2003,6 +2047,15 @@ class CheckUpgradeResponse(proto.Message): class ConflictResult(proto.Enum): r"""Whether there were python modules conflict during image build. + + Values: + CONFLICT_RESULT_UNSPECIFIED (0): + It is unknown whether build had conflicts or + not. + CONFLICT (1): + There were python packages conflicts. + NO_CONFLICT (2): + There were no python packages conflicts. """ CONFLICT_RESULT_UNSPECIFIED = 0 CONFLICT = 1 diff --git a/google/cloud/orchestration/airflow/service_v1beta1/types/operations.py b/google/cloud/orchestration/airflow/service_v1beta1/types/operations.py index 269b715..316152d 100644 --- a/google/cloud/orchestration/airflow/service_v1beta1/types/operations.py +++ b/google/cloud/orchestration/airflow/service_v1beta1/types/operations.py @@ -53,7 +53,22 @@ class OperationMetadata(proto.Message): """ class State(proto.Enum): - r"""An enum describing the overall state of an operation.""" + r"""An enum describing the overall state of an operation. + + Values: + STATE_UNSPECIFIED (0): + Unused. + PENDING (1): + The operation has been created but is not yet + started. + RUNNING (2): + The operation is underway. + SUCCESSFUL (3): + The operation completed successfully. + FAILED (4): + The operation is no longer running but did + not succeed. + """ STATE_UNSPECIFIED = 0 PENDING = 1 RUNNING = 2 @@ -61,7 +76,24 @@ class State(proto.Enum): FAILED = 4 class Type(proto.Enum): - r"""Type of longrunning operation.""" + r"""Type of longrunning operation. + + Values: + TYPE_UNSPECIFIED (0): + Unused. + CREATE (1): + A resource creation operation. + DELETE (2): + A resource deletion operation. + UPDATE (3): + A resource update operation. + CHECK (4): + A resource check operation. + SAVE_SNAPSHOT (5): + Saves snapshot of the resource operation. + LOAD_SNAPSHOT (6): + Loads snapshot of the resource operation. + """ TYPE_UNSPECIFIED = 0 CREATE = 1 DELETE = 2 diff --git a/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json index adb3f3f..afcb961 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-orchestration-airflow", - "version": "1.6.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json index 9feddef..5ba2ed3 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-orchestration-airflow-service", - "version": "1.6.0" + "version": "0.1.0" }, "snippets": [ { From 2c2a297bce9fd36682482a871e0fe0a941b74d51 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 11:00:40 -0500 Subject: [PATCH 2/2] chore(main): release 1.6.1 (#157) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 12 ++++++++++++ .../orchestration/airflow/service/gapic_version.py | 2 +- .../airflow/service_v1/gapic_version.py | 2 +- .../airflow/service_v1beta1/gapic_version.py | 2 +- ...oogle.cloud.orchestration.airflow.service.v1.json | 2 +- ....cloud.orchestration.airflow.service.v1beta1.json | 2 +- 7 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0d1bebe..093be7e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.6.0" + ".": "1.6.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d70123..aecba6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.6.1](https://github.com/googleapis/python-orchestration-airflow/compare/v1.6.0...v1.6.1) (2023-01-20) + + +### Bug Fixes + +* Add context manager return types ([693d570](https://github.com/googleapis/python-orchestration-airflow/commit/693d570fd0aa7cb1287329fd233e266219302ec3)) + + +### Documentation + +* Add documentation for enums ([693d570](https://github.com/googleapis/python-orchestration-airflow/commit/693d570fd0aa7cb1287329fd233e266219302ec3)) + ## [1.6.0](https://github.com/googleapis/python-orchestration-airflow/compare/v1.5.0...v1.6.0) (2023-01-10) diff --git a/google/cloud/orchestration/airflow/service/gapic_version.py b/google/cloud/orchestration/airflow/service/gapic_version.py index a016bdf..b4028ab 100644 --- a/google/cloud/orchestration/airflow/service/gapic_version.py +++ b/google/cloud/orchestration/airflow/service/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.6.0" # {x-release-please-version} +__version__ = "1.6.1" # {x-release-please-version} diff --git a/google/cloud/orchestration/airflow/service_v1/gapic_version.py b/google/cloud/orchestration/airflow/service_v1/gapic_version.py index a016bdf..b4028ab 100644 --- a/google/cloud/orchestration/airflow/service_v1/gapic_version.py +++ b/google/cloud/orchestration/airflow/service_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.6.0" # {x-release-please-version} +__version__ = "1.6.1" # {x-release-please-version} diff --git a/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py b/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py index a016bdf..b4028ab 100644 --- a/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py +++ b/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.6.0" # {x-release-please-version} +__version__ = "1.6.1" # {x-release-please-version} diff --git a/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json index afcb961..f2b8eee 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-orchestration-airflow", - "version": "0.1.0" + "version": "1.6.1" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json index 5ba2ed3..b3901e1 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-orchestration-airflow-service", - "version": "0.1.0" + "version": "1.6.1" }, "snippets": [ {