diff --git a/packages/google-cloud-config/google/cloud/config/__init__.py b/packages/google-cloud-config/google/cloud/config/__init__.py index 0c3495995bbb..f07c37a361c5 100644 --- a/packages/google-cloud-config/google/cloud/config/__init__.py +++ b/packages/google-cloud-config/google/cloud/config/__init__.py @@ -66,6 +66,7 @@ PreviewResult, PropertyChange, PropertyDrift, + ProviderConfig, QuotaValidation, Resource, ResourceCAIInfo, @@ -133,6 +134,7 @@ "PreviewResult", "PropertyChange", "PropertyDrift", + "ProviderConfig", "Resource", "ResourceCAIInfo", "ResourceChange", diff --git a/packages/google-cloud-config/google/cloud/config_v1/__init__.py b/packages/google-cloud-config/google/cloud/config_v1/__init__.py index d60af2bc0978..784e260f4877 100644 --- a/packages/google-cloud-config/google/cloud/config_v1/__init__.py +++ b/packages/google-cloud-config/google/cloud/config_v1/__init__.py @@ -65,6 +65,7 @@ PreviewResult, PropertyChange, PropertyDrift, + ProviderConfig, QuotaValidation, Resource, ResourceCAIInfo, @@ -132,6 +133,7 @@ "PreviewResult", "PropertyChange", "PropertyDrift", + "ProviderConfig", "QuotaValidation", "Resource", "ResourceCAIInfo", diff --git a/packages/google-cloud-config/google/cloud/config_v1/services/config/async_client.py b/packages/google-cloud-config/google/cloud/config_v1/services/config/async_client.py index 98607c67d0e7..9cf1d700785b 100644 --- a/packages/google-cloud-config/google/cloud/config_v1/services/config/async_client.py +++ b/packages/google-cloud-config/google/cloud/config_v1/services/config/async_client.py @@ -28,7 +28,6 @@ Type, Union, ) -import uuid from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 diff --git a/packages/google-cloud-config/google/cloud/config_v1/services/config/client.py b/packages/google-cloud-config/google/cloud/config_v1/services/config/client.py index d1562c2ecb41..d3daecf6e1d3 100644 --- a/packages/google-cloud-config/google/cloud/config_v1/services/config/client.py +++ b/packages/google-cloud-config/google/cloud/config_v1/services/config/client.py @@ -32,7 +32,6 @@ Union, cast, ) -import uuid import warnings from google.api_core import client_options as client_options_lib diff --git a/packages/google-cloud-config/google/cloud/config_v1/types/__init__.py b/packages/google-cloud-config/google/cloud/config_v1/types/__init__.py index 786b2586d664..f672a503cc09 100644 --- a/packages/google-cloud-config/google/cloud/config_v1/types/__init__.py +++ b/packages/google-cloud-config/google/cloud/config_v1/types/__init__.py @@ -59,6 +59,7 @@ PreviewResult, PropertyChange, PropertyDrift, + ProviderConfig, QuotaValidation, Resource, ResourceCAIInfo, @@ -124,6 +125,7 @@ "PreviewResult", "PropertyChange", "PropertyDrift", + "ProviderConfig", "Resource", "ResourceCAIInfo", "ResourceChange", diff --git a/packages/google-cloud-config/google/cloud/config_v1/types/config.py b/packages/google-cloud-config/google/cloud/config_v1/types/config.py index 63e89aec72ac..fc9a71020e51 100644 --- a/packages/google-cloud-config/google/cloud/config_v1/types/config.py +++ b/packages/google-cloud-config/google/cloud/config_v1/types/config.py @@ -88,6 +88,7 @@ "ListResourceDriftsRequest", "ListResourceDriftsResponse", "GetResourceDriftRequest", + "ProviderConfig", }, ) @@ -238,6 +239,9 @@ class Deployment(proto.Message): deployments during automation. See https://google.aip.dev/148#annotations for details on format and size limitations. + provider_config (google.cloud.config_v1.types.ProviderConfig): + Optional. This field specifies the provider + configurations. """ class State(proto.Enum): @@ -443,6 +447,11 @@ class LockState(proto.Enum): proto.STRING, number=24, ) + provider_config: "ProviderConfig" = proto.Field( + proto.MESSAGE, + number=25, + message="ProviderConfig", + ) class TerraformBlueprint(proto.Message): @@ -1161,6 +1170,9 @@ class Revision(proto.Message): resources in terraform configuration files. There are limited resources on which quota validation applies. + provider_config (google.cloud.config_v1.types.ProviderConfig): + Output only. This field specifies the + provider configurations. """ class Action(proto.Enum): @@ -1319,6 +1331,11 @@ class ErrorCode(proto.Enum): number=20, enum="QuotaValidation", ) + provider_config: "ProviderConfig" = proto.Field( + proto.MESSAGE, + number=21, + message="ProviderConfig", + ) class TerraformError(proto.Message): @@ -2054,6 +2071,9 @@ class Preview(proto.Message): preview during automation. See https://google.aip.dev/148#annotations for details on format and size limitations. + provider_config (google.cloud.config_v1.types.ProviderConfig): + Optional. This field specifies the provider + configurations. """ class State(proto.Enum): @@ -2237,6 +2257,11 @@ class ErrorCode(proto.Enum): proto.STRING, number=20, ) + provider_config: "ProviderConfig" = proto.Field( + proto.MESSAGE, + number=21, + message="ProviderConfig", + ) class PreviewOperationMetadata(proto.Message): @@ -3255,4 +3280,38 @@ class GetResourceDriftRequest(proto.Message): ) +class ProviderConfig(proto.Message): + r"""ProviderConfig contains the provider configurations. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + source_type (google.cloud.config_v1.types.ProviderConfig.ProviderSource): + Optional. ProviderSource specifies the source + type of the provider. + + This field is a member of `oneof`_ ``_source_type``. + """ + + class ProviderSource(proto.Enum): + r"""ProviderSource represents the source type of the provider. + + Values: + PROVIDER_SOURCE_UNSPECIFIED (0): + Unspecified source type, default to public + sources. + SERVICE_MAINTAINED (1): + Service maintained provider source type. + """ + PROVIDER_SOURCE_UNSPECIFIED = 0 + SERVICE_MAINTAINED = 1 + + source_type: ProviderSource = proto.Field( + proto.ENUM, + number=1, + optional=True, + enum=ProviderSource, + ) + + __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-config/tests/unit/gapic/config_v1/test_config.py b/packages/google-cloud-config/tests/unit/gapic/config_v1/test_config.py index 325a6055e8ae..7bc525bc0701 100644 --- a/packages/google-cloud-config/tests/unit/gapic/config_v1/test_config.py +++ b/packages/google-cloud-config/tests/unit/gapic/config_v1/test_config.py @@ -14,7 +14,6 @@ # limitations under the License. # import os -import re # try/except added for compatibility with python < 3.8 try: @@ -18835,6 +18834,7 @@ def test_create_deployment_rest_call_success(request_type): "tf_version": "tf_version_value", "quota_validation": 1, "annotations": {}, + "provider_config": {"source_type": 1}, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -19078,6 +19078,7 @@ def test_update_deployment_rest_call_success(request_type): "tf_version": "tf_version_value", "quota_validation": 1, "annotations": {}, + "provider_config": {"source_type": 1}, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -20812,6 +20813,7 @@ def test_create_preview_rest_call_success(request_type): "tf_version": "tf_version_value", "tf_version_constraint": "tf_version_constraint_value", "annotations": {}, + "provider_config": {"source_type": 1}, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency