diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7a564723..10d53e3a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.8.0" + ".": "2.8.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d81cb135..31ebb993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://pypi.org/project/google-cloud-iot/#history +## [2.8.1](https://github.com/googleapis/python-iot/compare/v2.8.0...v2.8.1) (2023-01-20) + + +### Bug Fixes + +* Add context manager return types ([b6a2a25](https://github.com/googleapis/python-iot/commit/b6a2a25c71c66065208e04d4954f5e4fa0bc4ee8)) + + +### Documentation + +* Add documentation for enums ([b6a2a25](https://github.com/googleapis/python-iot/commit/b6a2a25c71c66065208e04d4954f5e4fa0bc4ee8)) + ## [2.8.0](https://github.com/googleapis/python-iot/compare/v2.7.0...v2.8.0) (2023-01-10) diff --git a/google/cloud/iot/gapic_version.py b/google/cloud/iot/gapic_version.py index e248a9ca..15e84ffd 100644 --- a/google/cloud/iot/gapic_version.py +++ b/google/cloud/iot/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.8.0" # {x-release-please-version} +__version__ = "2.8.1" # {x-release-please-version} diff --git a/google/cloud/iot_v1/gapic_version.py b/google/cloud/iot_v1/gapic_version.py index e248a9ca..15e84ffd 100644 --- a/google/cloud/iot_v1/gapic_version.py +++ b/google/cloud/iot_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.8.0" # {x-release-please-version} +__version__ = "2.8.1" # {x-release-please-version} diff --git a/google/cloud/iot_v1/services/device_manager/client.py b/google/cloud/iot_v1/services/device_manager/client.py index 33faf02f..a6705f60 100644 --- a/google/cloud/iot_v1/services/device_manager/client.py +++ b/google/cloud/iot_v1/services/device_manager/client.py @@ -2720,7 +2720,7 @@ def sample_unbind_device_from_gateway(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "DeviceManagerClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/iot_v1/types/resources.py b/google/cloud/iot_v1/types/resources.py index ec88c18d..72bc3a81 100644 --- a/google/cloud/iot_v1/types/resources.py +++ b/google/cloud/iot_v1/types/resources.py @@ -50,6 +50,15 @@ class MqttState(proto.Enum): r"""Indicates whether an MQTT connection is enabled or disabled. See the field description for details. + + Values: + MQTT_STATE_UNSPECIFIED (0): + No MQTT state specified. If not specified, + MQTT will be enabled by default. + MQTT_ENABLED (1): + Enables a MQTT connection. + MQTT_DISABLED (2): + Disables a MQTT connection. """ MQTT_STATE_UNSPECIFIED = 0 MQTT_ENABLED = 1 @@ -59,6 +68,17 @@ class MqttState(proto.Enum): class HttpState(proto.Enum): r"""Indicates whether DeviceService (HTTP) is enabled or disabled for the registry. See the field description for details. + + Values: + HTTP_STATE_UNSPECIFIED (0): + No HTTP state specified. If not specified, + DeviceService will be enabled by default. + HTTP_ENABLED (1): + Enables DeviceService (HTTP) service for the + registry. + HTTP_DISABLED (2): + Disables DeviceService (HTTP) service for the + registry. """ HTTP_STATE_UNSPECIFIED = 0 HTTP_ENABLED = 1 @@ -72,6 +92,20 @@ class LogLevel(proto.Enum): should be written to logs. For example, if the LogLevel is ERROR, only events that terminate in errors will be logged. LogLevel is inclusive; enabling INFO logging will also enable ERROR logging. + + Values: + LOG_LEVEL_UNSPECIFIED (0): + No logging specified. If not specified, + logging will be disabled. + NONE (10): + Disables logging. + ERROR (20): + Error events will be logged. + INFO (30): + Informational events will be logged, such as + connections and disconnections. + DEBUG (40): + All events will be logged. """ LOG_LEVEL_UNSPECIFIED = 0 NONE = 10 @@ -81,7 +115,17 @@ class LogLevel(proto.Enum): class GatewayType(proto.Enum): - r"""Gateway type.""" + r"""Gateway type. + + Values: + GATEWAY_TYPE_UNSPECIFIED (0): + If unspecified, the device is considered a + non-gateway device. + GATEWAY (1): + The device is a gateway. + NON_GATEWAY (2): + The device is not a gateway. + """ GATEWAY_TYPE_UNSPECIFIED = 0 GATEWAY = 1 NON_GATEWAY = 2 @@ -91,6 +135,24 @@ class GatewayAuthMethod(proto.Enum): r"""The gateway authorization/authentication method. This setting determines how Cloud IoT Core authorizes/authenticate devices to access the gateway. + + Values: + GATEWAY_AUTH_METHOD_UNSPECIFIED (0): + No authentication/authorization method + specified. No devices are allowed to access the + gateway. + ASSOCIATION_ONLY (1): + The device is authenticated through the + gateway association only. Device credentials are + ignored even if provided. + DEVICE_AUTH_TOKEN_ONLY (2): + The device is authenticated through its own + credentials. Gateway association is not checked. + ASSOCIATION_AND_DEVICE_AUTH_TOKEN (3): + The device is authenticated through both + device credentials and gateway association. The + device must be bound to the gateway and must + provide its own credentials. """ GATEWAY_AUTH_METHOD_UNSPECIFIED = 0 ASSOCIATION_ONLY = 1 @@ -99,13 +161,58 @@ class GatewayAuthMethod(proto.Enum): class PublicKeyCertificateFormat(proto.Enum): - r"""The supported formats for the public key.""" + r"""The supported formats for the public key. + + Values: + UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT (0): + The format has not been specified. This is an + invalid default value and must not be used. + X509_CERTIFICATE_PEM (1): + An X.509v3 certificate + (`RFC5280 `__), + encoded in base64, and wrapped by + ``-----BEGIN CERTIFICATE-----`` and + ``-----END CERTIFICATE-----``. + """ UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0 X509_CERTIFICATE_PEM = 1 class PublicKeyFormat(proto.Enum): - r"""The supported formats for the public key.""" + r"""The supported formats for the public key. + + Values: + UNSPECIFIED_PUBLIC_KEY_FORMAT (0): + The format has not been specified. This is an + invalid default value and must not be used. + RSA_PEM (3): + An RSA public key encoded in base64, and wrapped by + ``-----BEGIN PUBLIC KEY-----`` and + ``-----END PUBLIC KEY-----``. This can be used to verify + ``RS256`` signatures in JWT tokens + (`RFC7518 `__). + RSA_X509_PEM (1): + As RSA_PEM, but wrapped in an X.509v3 certificate + (`RFC5280 `__), + encoded in base64, and wrapped by + ``-----BEGIN CERTIFICATE-----`` and + ``-----END CERTIFICATE-----``. + ES256_PEM (2): + Public key for the ECDSA algorithm using P-256 and SHA-256, + encoded in base64, and wrapped by + ``-----BEGIN PUBLIC KEY-----`` and + ``-----END PUBLIC KEY-----``. This can be used to verify JWT + tokens with the ``ES256`` algorithm + (`RFC7518 `__). This + curve is defined in `OpenSSL `__ + as the ``prime256v1`` curve. + ES256_X509_PEM (4): + As ES256_PEM, but wrapped in an X.509v3 certificate + (`RFC5280 `__), + encoded in base64, and wrapped by + ``-----BEGIN CERTIFICATE-----`` and + ``-----END CERTIFICATE-----``. + """ UNSPECIFIED_PUBLIC_KEY_FORMAT = 0 RSA_PEM = 3 RSA_X509_PEM = 1 diff --git a/samples/api-client/accesstoken_example/requirements-test.txt b/samples/api-client/accesstoken_example/requirements-test.txt index 8b9495c1..3daba3f0 100644 --- a/samples/api-client/accesstoken_example/requirements-test.txt +++ b/samples/api-client/accesstoken_example/requirements-test.txt @@ -1,3 +1,3 @@ -pytest==7.2.0 -google-cloud-pubsub==2.13.11 +pytest==7.2.1 +google-cloud-pubsub==2.13.12 google-cloud-storage==2.7.0 diff --git a/samples/api-client/accesstoken_example/requirements.txt b/samples/api-client/accesstoken_example/requirements.txt index cf592805..891cfa55 100644 --- a/samples/api-client/accesstoken_example/requirements.txt +++ b/samples/api-client/accesstoken_example/requirements.txt @@ -1,10 +1,10 @@ cryptography==39.0.0 flaky==3.7.0 -google-api-python-client==2.71.0 +google-api-python-client==2.73.0 google-auth-httplib2==0.1.0 google-auth==2.16.0 -google-cloud-iot==2.7.0 -google-cloud-pubsub==2.13.11 +google-cloud-iot==2.8.0 +google-cloud-pubsub==2.13.12 google-cloud-storage==2.7.0 paho-mqtt==1.6.1 pyjwt==2.6.0 diff --git a/samples/api-client/manager/requirements-test.txt b/samples/api-client/manager/requirements-test.txt index 49780e03..805eb2a9 100644 --- a/samples/api-client/manager/requirements-test.txt +++ b/samples/api-client/manager/requirements-test.txt @@ -1 +1 @@ -pytest==7.2.0 +pytest==7.2.1 diff --git a/samples/api-client/manager/requirements.txt b/samples/api-client/manager/requirements.txt index aebd50bc..d392e09a 100644 --- a/samples/api-client/manager/requirements.txt +++ b/samples/api-client/manager/requirements.txt @@ -1,9 +1,9 @@ cryptography==39.0.0 flaky==3.7.0 -google-api-python-client==2.71.0 +google-api-python-client==2.73.0 google-auth-httplib2==0.1.0 google-auth==2.16.0 -google-cloud-iot==2.7.0 -google-cloud-pubsub==2.13.11 +google-cloud-iot==2.8.0 +google-cloud-pubsub==2.13.12 paho-mqtt==1.6.1 pyjwt==2.6.0 diff --git a/samples/api-client/mqtt_example/requirements-test.txt b/samples/api-client/mqtt_example/requirements-test.txt index 49780e03..805eb2a9 100644 --- a/samples/api-client/mqtt_example/requirements-test.txt +++ b/samples/api-client/mqtt_example/requirements-test.txt @@ -1 +1 @@ -pytest==7.2.0 +pytest==7.2.1 diff --git a/samples/generated_samples/snippet_metadata_google.cloud.iot.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.iot.v1.json index 2ca92bbd..a07c90e6 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.iot.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.iot.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-iot", - "version": "2.8.0" + "version": "2.8.1" }, "snippets": [ {