From d596268609066ad822eb4a701903e4223ce21583 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 22:07:10 +0000 Subject: [PATCH] feat: [google-cloud-monitoring] Added support for notification prompts in AlertPolicy (#13325) BEGIN_COMMIT_OVERRIDE feat: Added support for notification prompts in AlertPolicy feat: Added support for PromQL metric validation opt-out in AlertPolicy END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. fix: Fix typing issue with gRPC metadata when key ends in -bin chore: Update gapic-generator-python to v1.21.0 PiperOrigin-RevId: 705285820 Source-Link: https://github.com/googleapis/googleapis/commit/f9b8b9150f7fcd600b0acaeef91236b1843f5e49 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ca1e0a1e472d6e6f5de883a5cb54724f112ce348 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1vbml0b3JpbmcvLk93bEJvdC55YW1sIiwiaCI6ImNhMWUwYTFlNDcyZDZlNmY1ZGU4ODNhNWNiNTQ3MjRmMTEyY2UzNDgifQ== BEGIN_NESTED_COMMIT feat: [google-cloud-monitoring] Added support for notification prompts in AlertPolicy feat: Added support for PromQL metric validation opt-out in AlertPolicy PiperOrigin-RevId: 702547115 Source-Link: https://github.com/googleapis/googleapis/commit/dedba31144b8adbe1475ff06a001f58433b9ac2a Source-Link: https://github.com/googleapis/googleapis-gen/commit/84131196764c8b4f7e24d5e6f4500ba2c1c938a4 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1vbml0b3JpbmcvLk93bEJvdC55YW1sIiwiaCI6Ijg0MTMxMTk2NzY0YzhiNGY3ZTI0ZDVlNmY0NTAwYmEyYzFjOTM4YTQifQ== END_NESTED_COMMIT --------- Co-authored-by: Owl Bot Co-authored-by: ohmayr Co-authored-by: Anthonios Partheniou --- .../google/cloud/monitoring/gapic_version.py | 2 +- .../cloud/monitoring_v3/gapic_version.py | 2 +- .../alert_policy_service/async_client.py | 6 +- .../services/alert_policy_service/client.py | 6 +- .../async_client.py | 9 +-- .../notification_channel_service/client.py | 9 +-- .../services/snooze_service/async_client.py | 2 - .../services/snooze_service/client.py | 2 - .../google/cloud/monitoring_v3/types/alert.py | 73 +++++++++++++------ .../monitoring_v3/types/alert_service.py | 21 +++--- .../cloud/monitoring_v3/types/notification.py | 3 +- .../types/notification_service.py | 35 ++++----- .../cloud/monitoring_v3/types/snooze.py | 3 +- ...ated_snooze_service_create_snooze_async.py | 1 - ...rated_snooze_service_create_snooze_sync.py | 1 - ...ated_snooze_service_update_snooze_async.py | 1 - ...rated_snooze_service_update_snooze_sync.py | 1 - ...snippet_metadata_google.monitoring.v3.json | 58 +++++++-------- 18 files changed, 128 insertions(+), 107 deletions(-) diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring/gapic_version.py b/packages/google-cloud-monitoring/google/cloud/monitoring/gapic_version.py index 64dfd834b468..558c8aab67c5 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring/gapic_version.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.23.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/gapic_version.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/gapic_version.py index 64dfd834b468..558c8aab67c5 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/gapic_version.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.23.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/alert_policy_service/async_client.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/alert_policy_service/async_client.py index f7526d46d63c..4bf37c99b141 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/alert_policy_service/async_client.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/alert_policy_service/async_client.py @@ -473,7 +473,7 @@ async def sample_get_alert_policy(): A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. For an overview - of alert policies, see [Introduction to + of alerting policies, see [Introduction to Alerting](\ https://cloud.google.com/monitoring/alerts/). """ @@ -611,7 +611,7 @@ async def sample_create_alert_policy(): A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. For an overview - of alert policies, see [Introduction to + of alerting policies, see [Introduction to Alerting](\ https://cloud.google.com/monitoring/alerts/). """ @@ -868,7 +868,7 @@ async def sample_update_alert_policy(): A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. For an overview - of alert policies, see [Introduction to + of alerting policies, see [Introduction to Alerting](\ https://cloud.google.com/monitoring/alerts/). """ diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/alert_policy_service/client.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/alert_policy_service/client.py index 7e050740088f..bc4efa852b92 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/alert_policy_service/client.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/alert_policy_service/client.py @@ -869,7 +869,7 @@ def sample_get_alert_policy(): A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. For an overview - of alert policies, see [Introduction to + of alerting policies, see [Introduction to Alerting](\ https://cloud.google.com/monitoring/alerts/). """ @@ -1004,7 +1004,7 @@ def sample_create_alert_policy(): A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. For an overview - of alert policies, see [Introduction to + of alerting policies, see [Introduction to Alerting](\ https://cloud.google.com/monitoring/alerts/). """ @@ -1255,7 +1255,7 @@ def sample_update_alert_policy(): A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. For an overview - of alert policies, see [Introduction to + of alerting policies, see [Introduction to Alerting](\ https://cloud.google.com/monitoring/alerts/). """ diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/notification_channel_service/async_client.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/notification_channel_service/async_client.py index e43dba38dcc6..fc9860e1a5fe 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/notification_channel_service/async_client.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/notification_channel_service/async_client.py @@ -1004,7 +1004,7 @@ async def sample_update_notification_channel(): request (Optional[Union[google.cloud.monitoring_v3.types.UpdateNotificationChannelRequest, dict]]): The request object. The ``UpdateNotificationChannel`` request. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - The fields to update. + Optional. The fields to update. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1149,10 +1149,9 @@ async def sample_delete_notification_channel(): will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If - false, channels that are still - referenced by an existing alerting - policy will fail to be deleted in a - delete operation. + false, this operation will fail if the + notification channel is referenced by + existing alerting policies. This corresponds to the ``force`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/notification_channel_service/client.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/notification_channel_service/client.py index 638df3ba107b..3ed9b75f2ff7 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/notification_channel_service/client.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/notification_channel_service/client.py @@ -1389,7 +1389,7 @@ def sample_update_notification_channel(): request (Union[google.cloud.monitoring_v3.types.UpdateNotificationChannelRequest, dict]): The request object. The ``UpdateNotificationChannel`` request. update_mask (google.protobuf.field_mask_pb2.FieldMask): - The fields to update. + Optional. The fields to update. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1533,10 +1533,9 @@ def sample_delete_notification_channel(): will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If - false, channels that are still - referenced by an existing alerting - policy will fail to be deleted in a - delete operation. + false, this operation will fail if the + notification channel is referenced by + existing alerting policies. This corresponds to the ``force`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/snooze_service/async_client.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/snooze_service/async_client.py index e8afc0ecc5eb..29fe944ae6ea 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/snooze_service/async_client.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/snooze_service/async_client.py @@ -297,7 +297,6 @@ async def sample_create_snooze(): # Initialize request argument(s) snooze = monitoring_v3.Snooze() - snooze.name = "name_value" snooze.display_name = "display_name_value" request = monitoring_v3.CreateSnoozeRequest( @@ -671,7 +670,6 @@ async def sample_update_snooze(): # Initialize request argument(s) snooze = monitoring_v3.Snooze() - snooze.name = "name_value" snooze.display_name = "display_name_value" request = monitoring_v3.UpdateSnoozeRequest( diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/snooze_service/client.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/snooze_service/client.py index 1f7c7d398b99..6b4cc07d9e04 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/snooze_service/client.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/snooze_service/client.py @@ -694,7 +694,6 @@ def sample_create_snooze(): # Initialize request argument(s) snooze = monitoring_v3.Snooze() - snooze.name = "name_value" snooze.display_name = "display_name_value" request = monitoring_v3.CreateSnoozeRequest( @@ -1059,7 +1058,6 @@ def sample_update_snooze(): # Initialize request argument(s) snooze = monitoring_v3.Snooze() - snooze.name = "name_value" snooze.display_name = "display_name_value" request = monitoring_v3.UpdateSnoozeRequest( diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/alert.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/alert.py index 20718f7e94a8..af26f5932b40 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/alert.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/alert.py @@ -36,14 +36,14 @@ class AlertPolicy(proto.Message): r"""A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people - or services about this state. For an overview of alert policies, see - `Introduction to + or services about this state. For an overview of alerting policies, + see `Introduction to Alerting `__. Attributes: name (str): - Required if the policy exists. The resource name for this - policy. The format is: + Identifier. Required if the policy exists. The resource name + for this policy. The format is: :: @@ -118,10 +118,10 @@ class AlertPolicy(proto.Message): unless a field projection has been specified that strips it out. validity (google.rpc.status_pb2.Status): - Read-only description of how the alert policy - is invalid. This field is only set when the - alert policy is invalid. An invalid alert policy - will not generate incidents. + Read-only description of how the alerting + policy is invalid. This field is only set when + the alerting policy is invalid. An invalid + alerting policy will not generate incidents. notification_channels (MutableSequence[str]): Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when @@ -146,10 +146,10 @@ class AlertPolicy(proto.Message): to the alerting policy. If provided in a call to create or update, this field will be ignored. alert_strategy (google.cloud.monitoring_v3.types.AlertPolicy.AlertStrategy): - Control over how this alert policy's + Control over how this alerting policy's notification channels are notified. severity (google.cloud.monitoring_v3.types.AlertPolicy.Severity): - Optional. The severity of an alert policy + Optional. The severity of an alerting policy indicates how important incidents generated by that policy are. The severity level will be displayed on the Incident detail page and in @@ -183,8 +183,8 @@ class ConditionCombinerType(proto.Enum): AND_WITH_MATCHING_RESOURCE = 3 class Severity(proto.Enum): - r"""An enumeration of possible severity level for an Alert - Policy. + r"""An enumeration of possible severity level for an alerting + policy. Values: SEVERITY_UNSPECIFIED (0): @@ -220,7 +220,7 @@ class Documentation(proto.Message): characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller. This text can be `templatized by using - variables `__. + variables `__. mime_type (str): The format of the ``content`` field. Presently, only the value ``"text/markdown"`` is supported. See @@ -240,7 +240,7 @@ class Documentation(proto.Message): The contents of the subject line can be `templatized by using - variables `__. + variables `__. If this field is missing or empty, a default subject line will be generated. links (MutableSequence[google.cloud.monitoring_v3.types.AlertPolicy.Documentation.Link]): @@ -712,7 +712,7 @@ class LogMatch(proto.Message): ) class MonitoringQueryLanguageCondition(proto.Message): - r"""A condition type that allows alert policies to be defined using + r"""A condition type that allows alerting policies to be defined using `Monitoring Query Language `__. @@ -770,7 +770,7 @@ class MonitoringQueryLanguageCondition(proto.Message): ) class PrometheusQueryLanguageCondition(proto.Message): - r"""A condition type that allows alert policies to be defined using + r"""A condition type that allows alerting policies to be defined using `Prometheus Query Language (PromQL) `__. @@ -831,7 +831,7 @@ class PrometheusQueryLanguageCondition(proto.Message): result. Label names `must be valid `__. Label values can be `templatized by using - variables `__. + variables `__. The only available variable names are the names of the labels in the PromQL result, including "**name**" and "value". "labels" may be empty. @@ -942,12 +942,17 @@ class AlertStrategy(proto.Message): Attributes: notification_rate_limit (google.cloud.monitoring_v3.types.AlertPolicy.AlertStrategy.NotificationRateLimit): - Required for alert policies with a ``LogMatch`` condition. - - This limit is not implemented for alert policies that are - not log-based. + Required for log-based alerting policies, i.e. policies with + a ``LogMatch`` condition. + + This limit is not implemented for alerting policies that do + not have a LogMatch condition. + notification_prompts (MutableSequence[google.cloud.monitoring_v3.types.AlertPolicy.AlertStrategy.NotificationPrompt]): + For log-based alert policies, the notification prompts is + always [OPENED]. For non log-based alert policies, the + notification prompts can be [OPENED] or [OPENED, CLOSED]. auto_close (google.protobuf.duration_pb2.Duration): - If an alert policy that was active has no + If an alerting policy that was active has no data for this long, any open incidents will close notification_channel_strategy (MutableSequence[google.cloud.monitoring_v3.types.AlertPolicy.AlertStrategy.NotificationChannelStrategy]): @@ -955,8 +960,23 @@ class AlertStrategy(proto.Message): on a per-channel basis. """ + class NotificationPrompt(proto.Enum): + r"""Control when notifications will be sent out. + + Values: + NOTIFICATION_PROMPT_UNSPECIFIED (0): + No strategy specified. Treated as error. + OPENED (1): + Notify when an incident is opened. + CLOSED (3): + Notify when an incident is closed. + """ + NOTIFICATION_PROMPT_UNSPECIFIED = 0 + OPENED = 1 + CLOSED = 3 + class NotificationRateLimit(proto.Message): - r"""Control over the rate of notifications sent to this alert + r"""Control over the rate of notifications sent to this alerting policy's notification channels. Attributes: @@ -1008,6 +1028,13 @@ class NotificationChannelStrategy(proto.Message): message="AlertPolicy.AlertStrategy.NotificationRateLimit", ) ) + notification_prompts: MutableSequence[ + "AlertPolicy.AlertStrategy.NotificationPrompt" + ] = proto.RepeatedField( + proto.ENUM, + number=2, + enum="AlertPolicy.AlertStrategy.NotificationPrompt", + ) auto_close: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=3, diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/alert_service.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/alert_service.py index e018f0830fba..fb4cc6e22a07 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/alert_service.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/alert_service.py @@ -110,27 +110,28 @@ class ListAlertPoliciesRequest(proto.Message): [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] operation, instead. filter (str): - If provided, this field specifies the criteria that must be - met by alert policies to be included in the response. + Optional. If provided, this field specifies the criteria + that must be met by alert policies to be included in the + response. For more details, see `sorting and filtering `__. order_by (str): - A comma-separated list of fields by which to sort the - result. Supports the same set of field references as the + Optional. A comma-separated list of fields by which to sort + the result. Supports the same set of field references as the ``filter`` field. Entries can be prefixed with a minus sign to sort by the field in descending order. For more details, see `sorting and filtering `__. page_size (int): - The maximum number of results to return in a - single response. + Optional. The maximum number of results to + return in a single response. page_token (str): - If this field is not empty then it must contain the - ``nextPageToken`` value returned by a previous call to this - method. Using this field causes the method to return more - results from the previous method call. + Optional. If this field is not empty then it must contain + the ``nextPageToken`` value returned by a previous call to + this method. Using this field causes the method to return + more results from the previous method call. """ name: str = proto.Field( diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/notification.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/notification.py index 3c7780101f1e..eaec29339200 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/notification.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/notification.py @@ -124,7 +124,8 @@ class NotificationChannel(proto.Message): [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field. name (str): - The full REST resource name for this channel. The format is: + Identifier. The full REST resource name for this channel. + The format is: :: diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/notification_service.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/notification_service.py index 5e393549b364..3c0fef0f0a0f 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/notification_service.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/notification_service.py @@ -191,28 +191,29 @@ class ListNotificationChannelsRequest(proto.Message): [``GetNotificationChannel``][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation. filter (str): - If provided, this field specifies the criteria that must be - met by notification channels to be included in the response. + Optional. If provided, this field specifies the criteria + that must be met by notification channels to be included in + the response. For more details, see `sorting and filtering `__. order_by (str): - A comma-separated list of fields by which to sort the - result. Supports the same set of fields as in ``filter``. - Entries can be prefixed with a minus sign to sort in - descending rather than ascending order. + Optional. A comma-separated list of fields by which to sort + the result. Supports the same set of fields as in + ``filter``. Entries can be prefixed with a minus sign to + sort in descending rather than ascending order. For more details, see `sorting and filtering `__. page_size (int): - The maximum number of results to return in a - single response. If not set to a positive - number, a reasonable value will be chosen by the - service. + Optional. The maximum number of results to + return in a single response. If not set to a + positive number, a reasonable value will be + chosen by the service. page_token (str): - If non-empty, ``page_token`` must contain a value returned - as the ``next_page_token`` in a previous response to request - the next set of results. + Optional. If non-empty, ``page_token`` must contain a value + returned as the ``next_page_token`` in a previous response + to request the next set of results. """ name: str = proto.Field( @@ -301,7 +302,7 @@ class UpdateNotificationChannelRequest(proto.Message): Attributes: update_mask (google.protobuf.field_mask_pb2.FieldMask): - The fields to update. + Optional. The fields to update. notification_channel (google.cloud.monitoring_v3.types.NotificationChannel): Required. A description of the changes to be applied to the specified notification channel. The description must provide @@ -336,9 +337,9 @@ class DeleteNotificationChannelRequest(proto.Message): If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the - channel). If false, channels that are still - referenced by an existing alerting policy will - fail to be deleted in a delete operation. + channel). If false, this operation will fail if + the notification channel is referenced by + existing alerting policies. """ name: str = proto.Field( diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/snooze.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/snooze.py index 38aa854c89a9..fe3e48d98383 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/snooze.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/snooze.py @@ -37,7 +37,8 @@ class Snooze(proto.Message): Attributes: name (str): - Required. The name of the ``Snooze``. The format is: + Required. Identifier. The name of the ``Snooze``. The format + is: :: diff --git a/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_create_snooze_async.py b/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_create_snooze_async.py index 38e2f1b30f81..c65cd4852d91 100644 --- a/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_create_snooze_async.py +++ b/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_create_snooze_async.py @@ -40,7 +40,6 @@ async def sample_create_snooze(): # Initialize request argument(s) snooze = monitoring_v3.Snooze() - snooze.name = "name_value" snooze.display_name = "display_name_value" request = monitoring_v3.CreateSnoozeRequest( diff --git a/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_create_snooze_sync.py b/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_create_snooze_sync.py index 65cd048f4f84..f53fbf330847 100644 --- a/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_create_snooze_sync.py +++ b/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_create_snooze_sync.py @@ -40,7 +40,6 @@ def sample_create_snooze(): # Initialize request argument(s) snooze = monitoring_v3.Snooze() - snooze.name = "name_value" snooze.display_name = "display_name_value" request = monitoring_v3.CreateSnoozeRequest( diff --git a/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_update_snooze_async.py b/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_update_snooze_async.py index 82e8986e7219..c8c9cb1c8fb9 100644 --- a/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_update_snooze_async.py +++ b/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_update_snooze_async.py @@ -40,7 +40,6 @@ async def sample_update_snooze(): # Initialize request argument(s) snooze = monitoring_v3.Snooze() - snooze.name = "name_value" snooze.display_name = "display_name_value" request = monitoring_v3.UpdateSnoozeRequest( diff --git a/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_update_snooze_sync.py b/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_update_snooze_sync.py index 11a62eebfe5e..d719a40f4fe3 100644 --- a/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_update_snooze_sync.py +++ b/packages/google-cloud-monitoring/samples/generated_samples/monitoring_v3_generated_snooze_service_update_snooze_sync.py @@ -40,7 +40,6 @@ def sample_update_snooze(): # Initialize request argument(s) snooze = monitoring_v3.Snooze() - snooze.name = "name_value" snooze.display_name = "display_name_value" request = monitoring_v3.UpdateSnoozeRequest( diff --git a/packages/google-cloud-monitoring/samples/generated_samples/snippet_metadata_google.monitoring.v3.json b/packages/google-cloud-monitoring/samples/generated_samples/snippet_metadata_google.monitoring.v3.json index e447d8c6ed80..58d80fb8193f 100644 --- a/packages/google-cloud-monitoring/samples/generated_samples/snippet_metadata_google.monitoring.v3.json +++ b/packages/google-cloud-monitoring/samples/generated_samples/snippet_metadata_google.monitoring.v3.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-monitoring", - "version": "2.23.1" + "version": "0.1.0" }, "snippets": [ { @@ -6723,12 +6723,12 @@ "regionTag": "monitoring_v3_generated_SnoozeService_CreateSnooze_async", "segments": [ { - "end": 56, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 56, + "end": 55, "start": 27, "type": "SHORT" }, @@ -6738,18 +6738,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 50, + "end": 49, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 53, - "start": 51, + "end": 52, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 57, - "start": 54, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ], @@ -6807,12 +6807,12 @@ "regionTag": "monitoring_v3_generated_SnoozeService_CreateSnooze_sync", "segments": [ { - "end": 56, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 56, + "end": 55, "start": 27, "type": "SHORT" }, @@ -6822,18 +6822,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 50, + "end": 49, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 53, - "start": 51, + "end": 52, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 57, - "start": 54, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ], @@ -7214,12 +7214,12 @@ "regionTag": "monitoring_v3_generated_SnoozeService_UpdateSnooze_async", "segments": [ { - "end": 55, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 55, + "end": 54, "start": 27, "type": "SHORT" }, @@ -7229,18 +7229,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 49, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 52, - "start": 50, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 56, - "start": 53, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], @@ -7298,12 +7298,12 @@ "regionTag": "monitoring_v3_generated_SnoozeService_UpdateSnooze_sync", "segments": [ { - "end": 55, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 55, + "end": 54, "start": 27, "type": "SHORT" }, @@ -7313,18 +7313,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 49, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 52, - "start": 50, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 56, - "start": 53, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ],