diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto index 2881c541ffc..ebf676e5ed0 100644 --- a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto @@ -986,9 +986,8 @@ message GetDeliveryPipelineRequest { // The request object for `CreateDeliveryPipeline`. message CreateDeliveryPipelineRequest { - // Required. The parent collection in which the `DeliveryPipeline` should be - // created. Format should be - // `projects/{project_id}/locations/{location_name}`. + // Required. The parent collection in which the `DeliveryPipeline` must be + // created. The format is `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1025,11 +1024,11 @@ message CreateDeliveryPipelineRequest { // The request object for `UpdateDeliveryPipeline`. message UpdateDeliveryPipelineRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // `DeliveryPipeline` resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it's in the mask. If the - // user doesn't provide a mask then all fields are overwritten. + // Required. Field mask is used to specify the fields to be overwritten by the + // update in the `DeliveryPipeline` resource. The fields specified in the + // update_mask are relative to the resource, not the full request. A field + // will be overwritten if it's in the mask. If the user doesn't provide a mask + // then all fields are overwritten. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; @@ -1063,7 +1062,7 @@ message UpdateDeliveryPipelineRequest { // The request object for `DeleteDeliveryPipeline`. message DeleteDeliveryPipelineRequest { - // Required. The name of the `DeliveryPipeline` to delete. Format should be + // Required. The name of the `DeliveryPipeline` to delete. The format is // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -1118,8 +1117,8 @@ message RollbackTargetConfig { // The request object for `RollbackTarget`. message RollbackTargetRequest { - // Required. The `DeliveryPipeline` for which the rollback `Rollout` should be - // created. Format should be + // Required. The `DeliveryPipeline` for which the rollback `Rollout` must be + // created. The format is // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -1495,8 +1494,8 @@ message GetTargetRequest { // The request object for `CreateTarget`. message CreateTargetRequest { - // Required. The parent collection in which the `Target` should be created. - // Format should be + // Required. The parent collection in which the `Target` must be created. + // The format is // `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -1533,11 +1532,11 @@ message CreateTargetRequest { // The request object for `UpdateTarget`. message UpdateTargetRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // Target resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it's in the mask. If the - // user doesn't provide a mask then all fields are overwritten. + // Required. Field mask is used to specify the fields to be overwritten by the + // update in the `Target` resource. The fields specified in the update_mask + // are relative to the resource, not the full request. A field will be + // overwritten if it's in the mask. If the user doesn't provide a mask then + // all fields are overwritten. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; @@ -1570,7 +1569,7 @@ message UpdateTargetRequest { // The request object for `DeleteTarget`. message DeleteTargetRequest { - // Required. The name of the `Target` to delete. Format should be + // Required. The name of the `Target` to delete. The format is // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -1813,9 +1812,8 @@ message GetCustomTargetTypeRequest { // The request object for `CreateCustomTargetType`. message CreateCustomTargetTypeRequest { - // Required. The parent collection in which the `CustomTargetType` should be - // created. Format should be - // `projects/{project_id}/locations/{location_name}`. + // Required. The parent collection in which the `CustomTargetType` must be + // created. The format is `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1852,11 +1850,11 @@ message CreateCustomTargetTypeRequest { // The request object for `UpdateCustomTargetType`. message UpdateCustomTargetTypeRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // `CustomTargetType` resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it's in the mask. If the - // user doesn't provide a mask then all fields are overwritten. + // Required. Field mask is used to specify the fields to be overwritten by the + // update in the `CustomTargetType` resource. The fields specified in the + // update_mask are relative to the resource, not the full request. A field + // will be overwritten if it's in the mask. If the user doesn't provide a mask + // then all fields are overwritten. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; @@ -1945,8 +1943,8 @@ message DeployPolicy { // Unspecified. INVOKER_UNSPECIFIED = 0; - // The action is user-driven (e.g. creating a rollout manually via a gcloud - // create command). + // The action is user-driven. For example, creating a rollout manually via a + // gcloud create command. USER = 1; // Automated action by Cloud Deploy. @@ -2027,9 +2025,9 @@ message DeployPolicy { // Contains information on the resources to select for a deploy policy. // Attributes provided must all match the resource in order for policy -// restrictions to apply. E.g. if delivery pipelines attributes given are an id -// "prod" and labels "foo: bar", a delivery pipeline resource must match both -// that id and have that label in order to be subject to the policy. +// restrictions to apply. For example, if delivery pipelines attributes given +// are an id "prod" and labels "foo: bar", a delivery pipeline resource must +// match both that id and have that label in order to be subject to the policy. message DeployPolicyResourceSelector { // Optional. Contains attributes about a delivery pipeline. DeliveryPipelineAttribute delivery_pipeline = 1 @@ -2043,6 +2041,7 @@ message DeployPolicyResourceSelector { message DeliveryPipelineAttribute { // ID of the `DeliveryPipeline`. The value of this field could be one of the // following: + // // * The last segment of a pipeline name. It only needs the ID to determine // which pipeline is being referred to // * "*", all delivery pipelines in a location. @@ -2056,6 +2055,7 @@ message DeliveryPipelineAttribute { message TargetAttribute { // ID of the `Target`. The value of this field could be one of the // following: + // // * The last segment of a target name. It only needs the ID to determine // which target is being referred to // * "*", all targets in a location. @@ -2118,11 +2118,11 @@ message RestrictRollout { // actions will be restricted. repeated Actions actions = 3; - // Required. Time Window within which actions are restricted. + // Required. Time window within which actions are restricted. TimeWindow time_window = 4 [(google.api.field_behavior) = REQUIRED]; } -// Time Window within which actions are restricted. +// Time window within which actions are restricted. message TimeWindow { // Required. The time zone in IANA format [IANA Time Zone // Database](https://www.iana.org/time-zones) (e.g. America/New_York). @@ -2418,9 +2418,8 @@ message Release { // The request object for `CreateDeployPolicy`. message CreateDeployPolicyRequest { - // Required. The parent collection in which the `DeployPolicy` should be - // created. Format should be - // `projects/{project_id}/locations/{location_name}`. + // Required. The parent collection in which the `DeployPolicy` must be + // created. The format is `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2456,11 +2455,11 @@ message CreateDeployPolicyRequest { // The request object for `UpdateDeployPolicy`. message UpdateDeployPolicyRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // `DeployPolicy` resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it's in the mask. If the - // user doesn't provide a mask then all fields are overwritten. + // Required. Field mask is used to specify the fields to be overwritten by the + // update in the `DeployPolicy` resource. The fields specified in the + // update_mask are relative to the resource, not the full request. A field + // will be overwritten if it's in the mask. If the user doesn't provide a mask + // then all fields are overwritten. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; @@ -2493,7 +2492,7 @@ message UpdateDeployPolicyRequest { // The request object for `DeleteDeployPolicy`. message DeleteDeployPolicyRequest { - // Required. The name of the `DeployPolicy` to delete. Format should be + // Required. The name of the `DeployPolicy` to delete. The format is // `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -2727,8 +2726,8 @@ message GetReleaseRequest { // The request object for `CreateRelease`, message CreateReleaseRequest { - // Required. The parent collection in which the `Release` should be created. - // Format should be + // Required. The parent collection in which the `Release` is created. + // The format is // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -3294,8 +3293,8 @@ message GetRolloutRequest { // CreateRolloutRequest is the request object used by `CreateRollout`. message CreateRolloutRequest { - // Required. The parent collection in which the `Rollout` should be created. - // Format should be + // Required. The parent collection in which the `Rollout` must be created. + // The format is // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -4073,8 +4072,8 @@ message AutomationRule { } } -// `PromoteRelease` rule will automatically promote a release from the current -// target to a specified target. +// The `PromoteRelease` rule will automatically promote a release from the +// current target to a specified target. message PromoteReleaseRule { // Required. ID of the rule. This id must be unique in the `Automation` // resource to which this rule belongs. The format is @@ -4204,8 +4203,8 @@ message AutomationRuleCondition { // The request object for `CreateAutomation`. message CreateAutomationRequest { - // Required. The parent collection in which the `Automation` should be - // created. Format should be + // Required. The parent collection in which the `Automation` must be created. + // The format is // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -4242,11 +4241,11 @@ message CreateAutomationRequest { // The request object for `UpdateAutomation`. message UpdateAutomationRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // `Automation` resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it's in the mask. If the - // user doesn't provide a mask then all fields are overwritten. + // Required. Field mask is used to specify the fields to be overwritten by the + // update in the `Automation` resource. The fields specified in the + // update_mask are relative to the resource, not the full request. A field + // will be overwritten if it's in the mask. If the user doesn't provide a mask + // then all fields are overwritten. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; @@ -4279,7 +4278,7 @@ message UpdateAutomationRequest { // The request object for `DeleteAutomation`. message DeleteAutomationRequest { - // Required. The name of the `Automation` to delete. Format should be + // Required. The name of the `Automation` to delete. The format is // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -4405,6 +4404,9 @@ message AutomationRun { // The `AutomationRun` is pending. PENDING = 5; + + // The `AutomationRun` was aborted. + ABORTED = 6; } // Output only. Name of the `AutomationRun`. Format is diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/customtargettype_notification_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/customtargettype_notification_payload.proto new file mode 100644 index 00000000000..9403a625db4 --- /dev/null +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/customtargettype_notification_payload.proto @@ -0,0 +1,41 @@ +// Copyright 2024 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "CustomTargetTypeNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/customtargettype_notification" +// Platform Log event that describes the failure to send a custom target type +// status change Pub/Sub notification. +message CustomTargetTypeNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // Unique identifier of the `CustomTargetType`. + string custom_target_type_uid = 4; + + // The name of the `CustomTargetType`. + string custom_target_type = 2; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 3; +} diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/deploypolicy_evaluation_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/deploypolicy_evaluation_payload.proto new file mode 100644 index 00000000000..eabffe9c017 --- /dev/null +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/deploypolicy_evaluation_payload.proto @@ -0,0 +1,101 @@ +// Copyright 2024 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/cloud_deploy.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "DeployPolicyEvaluationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/deploypolicy_evaluation" +// Platform Log event that describes the deploy policy evaluation event. +message DeployPolicyEvaluationEvent { + // The policy verdict of the request. + enum PolicyVerdict { + // This should never happen. + POLICY_VERDICT_UNSPECIFIED = 0; + + // Allowed by policy. This enum value is not currently used but may be used + // in the future. Currently logs are only generated when a request is denied + // by policy. + ALLOWED_BY_POLICY = 1; + + // Denied by policy. + DENIED_BY_POLICY = 2; + } + + // Things that could have overridden the policy verdict. When overrides are + // used, the request will be allowed even if it is DENIED_BY_POLICY. + enum PolicyVerdictOverride { + // This should never happen. + POLICY_VERDICT_OVERRIDE_UNSPECIFIED = 0; + + // The policy was overridden. + POLICY_OVERRIDDEN = 1; + + // The policy was suspended. + POLICY_SUSPENDED = 2; + } + + // Debug message for when a deploy policy event occurs. + string message = 1; + + // Rule type (e.g. Restrict Rollouts). + string rule_type = 2; + + // Rule id. + string rule = 3; + + // Unique identifier of the `Delivery Pipeline`. + string pipeline_uid = 4; + + // The name of the `Delivery Pipeline`. + string delivery_pipeline = 5; + + // Unique identifier of the `Target`. This is an optional field, as a `Target` + // may not always be applicable to a policy. + string target_uid = 6; + + // The name of the `Target`. This is an optional field, as a `Target` may not + // always be applicable to a policy. + string target = 7; + + // What invoked the action (e.g. a user or automation). + DeployPolicy.Invoker invoker = 8; + + // The name of the `DeployPolicy`. + string deploy_policy = 9; + + // Unique identifier of the `DeployPolicy`. + string deploy_policy_uid = 10; + + // Whether the request is allowed. Allowed is set as true if: + // (1) the request complies with the policy; or + // (2) the request doesn't comply with the policy but the policy was + // overridden; or + // (3) the request doesn't comply with the policy but the policy was suspended + bool allowed = 11; + + // The policy verdict of the request. + PolicyVerdict verdict = 12; + + // Things that could have overridden the policy verdict. Overrides together + // with verdict decide whether the request is allowed. + repeated PolicyVerdictOverride overrides = 13; +} diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/deploypolicy_notification_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/deploypolicy_notification_payload.proto new file mode 100644 index 00000000000..a8572936b04 --- /dev/null +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/deploypolicy_notification_payload.proto @@ -0,0 +1,42 @@ +// Copyright 2024 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "DeployPolicyNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/deploypolicy_notification". +// Platform Log event that describes the failure to send a pub/sub notification +// when there is a DeployPolicy status change. +message DeployPolicyNotificationEvent { + // Debug message for when a deploy policy fails to send a pub/sub + // notification. + string message = 1; + + // The name of the `DeployPolicy`. + string deploy_policy = 2; + + // Unique identifier of the deploy policy. + string deploy_policy_uid = 3; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 4; +} diff --git a/packages/google-cloud-deploy/protos/protos.d.ts b/packages/google-cloud-deploy/protos/protos.d.ts index c4abe69aa94..aa7bfdbab45 100644 --- a/packages/google-cloud-deploy/protos/protos.d.ts +++ b/packages/google-cloud-deploy/protos/protos.d.ts @@ -18926,7 +18926,8 @@ export namespace google { CANCELLED = 2, FAILED = 3, IN_PROGRESS = 4, - PENDING = 5 + PENDING = 5, + ABORTED = 6 } } @@ -20267,6 +20268,121 @@ export namespace google { REPAIR_STATE_SKIPPED = 6 } + /** Properties of a CustomTargetTypeNotificationEvent. */ + interface ICustomTargetTypeNotificationEvent { + + /** CustomTargetTypeNotificationEvent message */ + message?: (string|null); + + /** CustomTargetTypeNotificationEvent customTargetTypeUid */ + customTargetTypeUid?: (string|null); + + /** CustomTargetTypeNotificationEvent customTargetType */ + customTargetType?: (string|null); + + /** CustomTargetTypeNotificationEvent type */ + type?: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type|null); + } + + /** Represents a CustomTargetTypeNotificationEvent. */ + class CustomTargetTypeNotificationEvent implements ICustomTargetTypeNotificationEvent { + + /** + * Constructs a new CustomTargetTypeNotificationEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ICustomTargetTypeNotificationEvent); + + /** CustomTargetTypeNotificationEvent message. */ + public message: string; + + /** CustomTargetTypeNotificationEvent customTargetTypeUid. */ + public customTargetTypeUid: string; + + /** CustomTargetTypeNotificationEvent customTargetType. */ + public customTargetType: string; + + /** CustomTargetTypeNotificationEvent type. */ + public type: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type); + + /** + * Creates a new CustomTargetTypeNotificationEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomTargetTypeNotificationEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.ICustomTargetTypeNotificationEvent): google.cloud.deploy.v1.CustomTargetTypeNotificationEvent; + + /** + * Encodes the specified CustomTargetTypeNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.CustomTargetTypeNotificationEvent.verify|verify} messages. + * @param message CustomTargetTypeNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ICustomTargetTypeNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomTargetTypeNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CustomTargetTypeNotificationEvent.verify|verify} messages. + * @param message CustomTargetTypeNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ICustomTargetTypeNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomTargetTypeNotificationEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomTargetTypeNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CustomTargetTypeNotificationEvent; + + /** + * Decodes a CustomTargetTypeNotificationEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomTargetTypeNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CustomTargetTypeNotificationEvent; + + /** + * Verifies a CustomTargetTypeNotificationEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomTargetTypeNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomTargetTypeNotificationEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CustomTargetTypeNotificationEvent; + + /** + * Creates a plain object from a CustomTargetTypeNotificationEvent message. Also converts values to other types if specified. + * @param message CustomTargetTypeNotificationEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.CustomTargetTypeNotificationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomTargetTypeNotificationEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomTargetTypeNotificationEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a DeliveryPipelineNotificationEvent. */ interface IDeliveryPipelineNotificationEvent { @@ -20382,6 +20498,307 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a DeployPolicyEvaluationEvent. */ + interface IDeployPolicyEvaluationEvent { + + /** DeployPolicyEvaluationEvent message */ + message?: (string|null); + + /** DeployPolicyEvaluationEvent ruleType */ + ruleType?: (string|null); + + /** DeployPolicyEvaluationEvent rule */ + rule?: (string|null); + + /** DeployPolicyEvaluationEvent pipelineUid */ + pipelineUid?: (string|null); + + /** DeployPolicyEvaluationEvent deliveryPipeline */ + deliveryPipeline?: (string|null); + + /** DeployPolicyEvaluationEvent targetUid */ + targetUid?: (string|null); + + /** DeployPolicyEvaluationEvent target */ + target?: (string|null); + + /** DeployPolicyEvaluationEvent invoker */ + invoker?: (google.cloud.deploy.v1.DeployPolicy.Invoker|keyof typeof google.cloud.deploy.v1.DeployPolicy.Invoker|null); + + /** DeployPolicyEvaluationEvent deployPolicy */ + deployPolicy?: (string|null); + + /** DeployPolicyEvaluationEvent deployPolicyUid */ + deployPolicyUid?: (string|null); + + /** DeployPolicyEvaluationEvent allowed */ + allowed?: (boolean|null); + + /** DeployPolicyEvaluationEvent verdict */ + verdict?: (google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdict|keyof typeof google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdict|null); + + /** DeployPolicyEvaluationEvent overrides */ + overrides?: (google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdictOverride[]|null); + } + + /** Represents a DeployPolicyEvaluationEvent. */ + class DeployPolicyEvaluationEvent implements IDeployPolicyEvaluationEvent { + + /** + * Constructs a new DeployPolicyEvaluationEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDeployPolicyEvaluationEvent); + + /** DeployPolicyEvaluationEvent message. */ + public message: string; + + /** DeployPolicyEvaluationEvent ruleType. */ + public ruleType: string; + + /** DeployPolicyEvaluationEvent rule. */ + public rule: string; + + /** DeployPolicyEvaluationEvent pipelineUid. */ + public pipelineUid: string; + + /** DeployPolicyEvaluationEvent deliveryPipeline. */ + public deliveryPipeline: string; + + /** DeployPolicyEvaluationEvent targetUid. */ + public targetUid: string; + + /** DeployPolicyEvaluationEvent target. */ + public target: string; + + /** DeployPolicyEvaluationEvent invoker. */ + public invoker: (google.cloud.deploy.v1.DeployPolicy.Invoker|keyof typeof google.cloud.deploy.v1.DeployPolicy.Invoker); + + /** DeployPolicyEvaluationEvent deployPolicy. */ + public deployPolicy: string; + + /** DeployPolicyEvaluationEvent deployPolicyUid. */ + public deployPolicyUid: string; + + /** DeployPolicyEvaluationEvent allowed. */ + public allowed: boolean; + + /** DeployPolicyEvaluationEvent verdict. */ + public verdict: (google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdict|keyof typeof google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdict); + + /** DeployPolicyEvaluationEvent overrides. */ + public overrides: google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdictOverride[]; + + /** + * Creates a new DeployPolicyEvaluationEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployPolicyEvaluationEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.IDeployPolicyEvaluationEvent): google.cloud.deploy.v1.DeployPolicyEvaluationEvent; + + /** + * Encodes the specified DeployPolicyEvaluationEvent message. Does not implicitly {@link google.cloud.deploy.v1.DeployPolicyEvaluationEvent.verify|verify} messages. + * @param message DeployPolicyEvaluationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDeployPolicyEvaluationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployPolicyEvaluationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployPolicyEvaluationEvent.verify|verify} messages. + * @param message DeployPolicyEvaluationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDeployPolicyEvaluationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployPolicyEvaluationEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployPolicyEvaluationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DeployPolicyEvaluationEvent; + + /** + * Decodes a DeployPolicyEvaluationEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployPolicyEvaluationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DeployPolicyEvaluationEvent; + + /** + * Verifies a DeployPolicyEvaluationEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeployPolicyEvaluationEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployPolicyEvaluationEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeployPolicyEvaluationEvent; + + /** + * Creates a plain object from a DeployPolicyEvaluationEvent message. Also converts values to other types if specified. + * @param message DeployPolicyEvaluationEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DeployPolicyEvaluationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployPolicyEvaluationEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployPolicyEvaluationEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeployPolicyEvaluationEvent { + + /** PolicyVerdict enum. */ + enum PolicyVerdict { + POLICY_VERDICT_UNSPECIFIED = 0, + ALLOWED_BY_POLICY = 1, + DENIED_BY_POLICY = 2 + } + + /** PolicyVerdictOverride enum. */ + enum PolicyVerdictOverride { + POLICY_VERDICT_OVERRIDE_UNSPECIFIED = 0, + POLICY_OVERRIDDEN = 1, + POLICY_SUSPENDED = 2 + } + } + + /** Properties of a DeployPolicyNotificationEvent. */ + interface IDeployPolicyNotificationEvent { + + /** DeployPolicyNotificationEvent message */ + message?: (string|null); + + /** DeployPolicyNotificationEvent deployPolicy */ + deployPolicy?: (string|null); + + /** DeployPolicyNotificationEvent deployPolicyUid */ + deployPolicyUid?: (string|null); + + /** DeployPolicyNotificationEvent type */ + type?: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type|null); + } + + /** Represents a DeployPolicyNotificationEvent. */ + class DeployPolicyNotificationEvent implements IDeployPolicyNotificationEvent { + + /** + * Constructs a new DeployPolicyNotificationEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDeployPolicyNotificationEvent); + + /** DeployPolicyNotificationEvent message. */ + public message: string; + + /** DeployPolicyNotificationEvent deployPolicy. */ + public deployPolicy: string; + + /** DeployPolicyNotificationEvent deployPolicyUid. */ + public deployPolicyUid: string; + + /** DeployPolicyNotificationEvent type. */ + public type: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type); + + /** + * Creates a new DeployPolicyNotificationEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployPolicyNotificationEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.IDeployPolicyNotificationEvent): google.cloud.deploy.v1.DeployPolicyNotificationEvent; + + /** + * Encodes the specified DeployPolicyNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.DeployPolicyNotificationEvent.verify|verify} messages. + * @param message DeployPolicyNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDeployPolicyNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployPolicyNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployPolicyNotificationEvent.verify|verify} messages. + * @param message DeployPolicyNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDeployPolicyNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployPolicyNotificationEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployPolicyNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DeployPolicyNotificationEvent; + + /** + * Decodes a DeployPolicyNotificationEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployPolicyNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DeployPolicyNotificationEvent; + + /** + * Verifies a DeployPolicyNotificationEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeployPolicyNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployPolicyNotificationEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeployPolicyNotificationEvent; + + /** + * Creates a plain object from a DeployPolicyNotificationEvent message. Also converts values to other types if specified. + * @param message DeployPolicyNotificationEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DeployPolicyNotificationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployPolicyNotificationEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployPolicyNotificationEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a JobRunNotificationEvent. */ interface IJobRunNotificationEvent { diff --git a/packages/google-cloud-deploy/protos/protos.js b/packages/google-cloud-deploy/protos/protos.js index 2916693106b..fa858b2fb3c 100644 --- a/packages/google-cloud-deploy/protos/protos.js +++ b/packages/google-cloud-deploy/protos/protos.js @@ -47415,6 +47415,7 @@ case 3: case 4: case 5: + case 6: break; } if (message.stateDescription != null && message.hasOwnProperty("stateDescription")) @@ -47538,6 +47539,10 @@ case 5: message.state = 5; break; + case "ABORTED": + case 6: + message.state = 6; + break; } if (object.stateDescription != null) message.stateDescription = String(object.stateDescription); @@ -47689,6 +47694,7 @@ * @property {number} FAILED=3 FAILED value * @property {number} IN_PROGRESS=4 IN_PROGRESS value * @property {number} PENDING=5 PENDING value + * @property {number} ABORTED=6 ABORTED value */ AutomationRun.State = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -47698,6 +47704,7 @@ values[valuesById[3] = "FAILED"] = 3; values[valuesById[4] = "IN_PROGRESS"] = 4; values[valuesById[5] = "PENDING"] = 5; + values[valuesById[6] = "ABORTED"] = 6; return values; })(); @@ -51040,6 +51047,328 @@ return values; })(); + v1.CustomTargetTypeNotificationEvent = (function() { + + /** + * Properties of a CustomTargetTypeNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @interface ICustomTargetTypeNotificationEvent + * @property {string|null} [message] CustomTargetTypeNotificationEvent message + * @property {string|null} [customTargetTypeUid] CustomTargetTypeNotificationEvent customTargetTypeUid + * @property {string|null} [customTargetType] CustomTargetTypeNotificationEvent customTargetType + * @property {google.cloud.deploy.v1.Type|null} [type] CustomTargetTypeNotificationEvent type + */ + + /** + * Constructs a new CustomTargetTypeNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CustomTargetTypeNotificationEvent. + * @implements ICustomTargetTypeNotificationEvent + * @constructor + * @param {google.cloud.deploy.v1.ICustomTargetTypeNotificationEvent=} [properties] Properties to set + */ + function CustomTargetTypeNotificationEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomTargetTypeNotificationEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @instance + */ + CustomTargetTypeNotificationEvent.prototype.message = ""; + + /** + * CustomTargetTypeNotificationEvent customTargetTypeUid. + * @member {string} customTargetTypeUid + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @instance + */ + CustomTargetTypeNotificationEvent.prototype.customTargetTypeUid = ""; + + /** + * CustomTargetTypeNotificationEvent customTargetType. + * @member {string} customTargetType + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @instance + */ + CustomTargetTypeNotificationEvent.prototype.customTargetType = ""; + + /** + * CustomTargetTypeNotificationEvent type. + * @member {google.cloud.deploy.v1.Type} type + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @instance + */ + CustomTargetTypeNotificationEvent.prototype.type = 0; + + /** + * Creates a new CustomTargetTypeNotificationEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @static + * @param {google.cloud.deploy.v1.ICustomTargetTypeNotificationEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CustomTargetTypeNotificationEvent} CustomTargetTypeNotificationEvent instance + */ + CustomTargetTypeNotificationEvent.create = function create(properties) { + return new CustomTargetTypeNotificationEvent(properties); + }; + + /** + * Encodes the specified CustomTargetTypeNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.CustomTargetTypeNotificationEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @static + * @param {google.cloud.deploy.v1.ICustomTargetTypeNotificationEvent} message CustomTargetTypeNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomTargetTypeNotificationEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.customTargetType != null && Object.hasOwnProperty.call(message, "customTargetType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.customTargetType); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.customTargetTypeUid != null && Object.hasOwnProperty.call(message, "customTargetTypeUid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.customTargetTypeUid); + return writer; + }; + + /** + * Encodes the specified CustomTargetTypeNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CustomTargetTypeNotificationEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @static + * @param {google.cloud.deploy.v1.ICustomTargetTypeNotificationEvent} message CustomTargetTypeNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomTargetTypeNotificationEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomTargetTypeNotificationEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CustomTargetTypeNotificationEvent} CustomTargetTypeNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomTargetTypeNotificationEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CustomTargetTypeNotificationEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 4: { + message.customTargetTypeUid = reader.string(); + break; + } + case 2: { + message.customTargetType = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomTargetTypeNotificationEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CustomTargetTypeNotificationEvent} CustomTargetTypeNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomTargetTypeNotificationEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomTargetTypeNotificationEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomTargetTypeNotificationEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.customTargetTypeUid != null && message.hasOwnProperty("customTargetTypeUid")) + if (!$util.isString(message.customTargetTypeUid)) + return "customTargetTypeUid: string expected"; + if (message.customTargetType != null && message.hasOwnProperty("customTargetType")) + if (!$util.isString(message.customTargetType)) + return "customTargetType: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 3: + case 4: + case 5: + case 6: + case 7: + case 2: + break; + } + return null; + }; + + /** + * Creates a CustomTargetTypeNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CustomTargetTypeNotificationEvent} CustomTargetTypeNotificationEvent + */ + CustomTargetTypeNotificationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CustomTargetTypeNotificationEvent) + return object; + var message = new $root.google.cloud.deploy.v1.CustomTargetTypeNotificationEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.customTargetTypeUid != null) + message.customTargetTypeUid = String(object.customTargetTypeUid); + if (object.customTargetType != null) + message.customTargetType = String(object.customTargetType); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_PUBSUB_NOTIFICATION_FAILURE": + case 1: + message.type = 1; + break; + case "TYPE_RESOURCE_STATE_CHANGE": + case 3: + message.type = 3; + break; + case "TYPE_PROCESS_ABORTED": + case 4: + message.type = 4; + break; + case "TYPE_RESTRICTION_VIOLATED": + case 5: + message.type = 5; + break; + case "TYPE_RESOURCE_DELETED": + case 6: + message.type = 6; + break; + case "TYPE_ROLLOUT_UPDATE": + case 7: + message.type = 7; + break; + case "TYPE_RENDER_STATUES_CHANGE": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a CustomTargetTypeNotificationEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @static + * @param {google.cloud.deploy.v1.CustomTargetTypeNotificationEvent} message CustomTargetTypeNotificationEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomTargetTypeNotificationEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.customTargetType = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.customTargetTypeUid = ""; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.customTargetType != null && message.hasOwnProperty("customTargetType")) + object.customTargetType = message.customTargetType; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.deploy.v1.Type[message.type] === undefined ? message.type : $root.google.cloud.deploy.v1.Type[message.type] : message.type; + if (message.customTargetTypeUid != null && message.hasOwnProperty("customTargetTypeUid")) + object.customTargetTypeUid = message.customTargetTypeUid; + return object; + }; + + /** + * Converts this CustomTargetTypeNotificationEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @instance + * @returns {Object.} JSON object + */ + CustomTargetTypeNotificationEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomTargetTypeNotificationEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CustomTargetTypeNotificationEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomTargetTypeNotificationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CustomTargetTypeNotificationEvent"; + }; + + return CustomTargetTypeNotificationEvent; + })(); + v1.DeliveryPipelineNotificationEvent = (function() { /** @@ -51362,6 +51691,937 @@ return DeliveryPipelineNotificationEvent; })(); + v1.DeployPolicyEvaluationEvent = (function() { + + /** + * Properties of a DeployPolicyEvaluationEvent. + * @memberof google.cloud.deploy.v1 + * @interface IDeployPolicyEvaluationEvent + * @property {string|null} [message] DeployPolicyEvaluationEvent message + * @property {string|null} [ruleType] DeployPolicyEvaluationEvent ruleType + * @property {string|null} [rule] DeployPolicyEvaluationEvent rule + * @property {string|null} [pipelineUid] DeployPolicyEvaluationEvent pipelineUid + * @property {string|null} [deliveryPipeline] DeployPolicyEvaluationEvent deliveryPipeline + * @property {string|null} [targetUid] DeployPolicyEvaluationEvent targetUid + * @property {string|null} [target] DeployPolicyEvaluationEvent target + * @property {google.cloud.deploy.v1.DeployPolicy.Invoker|null} [invoker] DeployPolicyEvaluationEvent invoker + * @property {string|null} [deployPolicy] DeployPolicyEvaluationEvent deployPolicy + * @property {string|null} [deployPolicyUid] DeployPolicyEvaluationEvent deployPolicyUid + * @property {boolean|null} [allowed] DeployPolicyEvaluationEvent allowed + * @property {google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdict|null} [verdict] DeployPolicyEvaluationEvent verdict + * @property {Array.|null} [overrides] DeployPolicyEvaluationEvent overrides + */ + + /** + * Constructs a new DeployPolicyEvaluationEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeployPolicyEvaluationEvent. + * @implements IDeployPolicyEvaluationEvent + * @constructor + * @param {google.cloud.deploy.v1.IDeployPolicyEvaluationEvent=} [properties] Properties to set + */ + function DeployPolicyEvaluationEvent(properties) { + this.overrides = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeployPolicyEvaluationEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.message = ""; + + /** + * DeployPolicyEvaluationEvent ruleType. + * @member {string} ruleType + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.ruleType = ""; + + /** + * DeployPolicyEvaluationEvent rule. + * @member {string} rule + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.rule = ""; + + /** + * DeployPolicyEvaluationEvent pipelineUid. + * @member {string} pipelineUid + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.pipelineUid = ""; + + /** + * DeployPolicyEvaluationEvent deliveryPipeline. + * @member {string} deliveryPipeline + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.deliveryPipeline = ""; + + /** + * DeployPolicyEvaluationEvent targetUid. + * @member {string} targetUid + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.targetUid = ""; + + /** + * DeployPolicyEvaluationEvent target. + * @member {string} target + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.target = ""; + + /** + * DeployPolicyEvaluationEvent invoker. + * @member {google.cloud.deploy.v1.DeployPolicy.Invoker} invoker + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.invoker = 0; + + /** + * DeployPolicyEvaluationEvent deployPolicy. + * @member {string} deployPolicy + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.deployPolicy = ""; + + /** + * DeployPolicyEvaluationEvent deployPolicyUid. + * @member {string} deployPolicyUid + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.deployPolicyUid = ""; + + /** + * DeployPolicyEvaluationEvent allowed. + * @member {boolean} allowed + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.allowed = false; + + /** + * DeployPolicyEvaluationEvent verdict. + * @member {google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdict} verdict + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.verdict = 0; + + /** + * DeployPolicyEvaluationEvent overrides. + * @member {Array.} overrides + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + */ + DeployPolicyEvaluationEvent.prototype.overrides = $util.emptyArray; + + /** + * Creates a new DeployPolicyEvaluationEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @static + * @param {google.cloud.deploy.v1.IDeployPolicyEvaluationEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeployPolicyEvaluationEvent} DeployPolicyEvaluationEvent instance + */ + DeployPolicyEvaluationEvent.create = function create(properties) { + return new DeployPolicyEvaluationEvent(properties); + }; + + /** + * Encodes the specified DeployPolicyEvaluationEvent message. Does not implicitly {@link google.cloud.deploy.v1.DeployPolicyEvaluationEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @static + * @param {google.cloud.deploy.v1.IDeployPolicyEvaluationEvent} message DeployPolicyEvaluationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployPolicyEvaluationEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.ruleType != null && Object.hasOwnProperty.call(message, "ruleType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ruleType); + if (message.rule != null && Object.hasOwnProperty.call(message, "rule")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rule); + if (message.pipelineUid != null && Object.hasOwnProperty.call(message, "pipelineUid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pipelineUid); + if (message.deliveryPipeline != null && Object.hasOwnProperty.call(message, "deliveryPipeline")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.deliveryPipeline); + if (message.targetUid != null && Object.hasOwnProperty.call(message, "targetUid")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.targetUid); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.target); + if (message.invoker != null && Object.hasOwnProperty.call(message, "invoker")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.invoker); + if (message.deployPolicy != null && Object.hasOwnProperty.call(message, "deployPolicy")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.deployPolicy); + if (message.deployPolicyUid != null && Object.hasOwnProperty.call(message, "deployPolicyUid")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.deployPolicyUid); + if (message.allowed != null && Object.hasOwnProperty.call(message, "allowed")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.allowed); + if (message.verdict != null && Object.hasOwnProperty.call(message, "verdict")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.verdict); + if (message.overrides != null && message.overrides.length) { + writer.uint32(/* id 13, wireType 2 =*/106).fork(); + for (var i = 0; i < message.overrides.length; ++i) + writer.int32(message.overrides[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DeployPolicyEvaluationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployPolicyEvaluationEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @static + * @param {google.cloud.deploy.v1.IDeployPolicyEvaluationEvent} message DeployPolicyEvaluationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployPolicyEvaluationEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployPolicyEvaluationEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeployPolicyEvaluationEvent} DeployPolicyEvaluationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployPolicyEvaluationEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployPolicyEvaluationEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.ruleType = reader.string(); + break; + } + case 3: { + message.rule = reader.string(); + break; + } + case 4: { + message.pipelineUid = reader.string(); + break; + } + case 5: { + message.deliveryPipeline = reader.string(); + break; + } + case 6: { + message.targetUid = reader.string(); + break; + } + case 7: { + message.target = reader.string(); + break; + } + case 8: { + message.invoker = reader.int32(); + break; + } + case 9: { + message.deployPolicy = reader.string(); + break; + } + case 10: { + message.deployPolicyUid = reader.string(); + break; + } + case 11: { + message.allowed = reader.bool(); + break; + } + case 12: { + message.verdict = reader.int32(); + break; + } + case 13: { + if (!(message.overrides && message.overrides.length)) + message.overrides = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.overrides.push(reader.int32()); + } else + message.overrides.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployPolicyEvaluationEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeployPolicyEvaluationEvent} DeployPolicyEvaluationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployPolicyEvaluationEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployPolicyEvaluationEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployPolicyEvaluationEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.ruleType != null && message.hasOwnProperty("ruleType")) + if (!$util.isString(message.ruleType)) + return "ruleType: string expected"; + if (message.rule != null && message.hasOwnProperty("rule")) + if (!$util.isString(message.rule)) + return "rule: string expected"; + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + if (!$util.isString(message.pipelineUid)) + return "pipelineUid: string expected"; + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) + if (!$util.isString(message.deliveryPipeline)) + return "deliveryPipeline: string expected"; + if (message.targetUid != null && message.hasOwnProperty("targetUid")) + if (!$util.isString(message.targetUid)) + return "targetUid: string expected"; + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.invoker != null && message.hasOwnProperty("invoker")) + switch (message.invoker) { + default: + return "invoker: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.deployPolicy != null && message.hasOwnProperty("deployPolicy")) + if (!$util.isString(message.deployPolicy)) + return "deployPolicy: string expected"; + if (message.deployPolicyUid != null && message.hasOwnProperty("deployPolicyUid")) + if (!$util.isString(message.deployPolicyUid)) + return "deployPolicyUid: string expected"; + if (message.allowed != null && message.hasOwnProperty("allowed")) + if (typeof message.allowed !== "boolean") + return "allowed: boolean expected"; + if (message.verdict != null && message.hasOwnProperty("verdict")) + switch (message.verdict) { + default: + return "verdict: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.overrides != null && message.hasOwnProperty("overrides")) { + if (!Array.isArray(message.overrides)) + return "overrides: array expected"; + for (var i = 0; i < message.overrides.length; ++i) + switch (message.overrides[i]) { + default: + return "overrides: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a DeployPolicyEvaluationEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeployPolicyEvaluationEvent} DeployPolicyEvaluationEvent + */ + DeployPolicyEvaluationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeployPolicyEvaluationEvent) + return object; + var message = new $root.google.cloud.deploy.v1.DeployPolicyEvaluationEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.ruleType != null) + message.ruleType = String(object.ruleType); + if (object.rule != null) + message.rule = String(object.rule); + if (object.pipelineUid != null) + message.pipelineUid = String(object.pipelineUid); + if (object.deliveryPipeline != null) + message.deliveryPipeline = String(object.deliveryPipeline); + if (object.targetUid != null) + message.targetUid = String(object.targetUid); + if (object.target != null) + message.target = String(object.target); + switch (object.invoker) { + default: + if (typeof object.invoker === "number") { + message.invoker = object.invoker; + break; + } + break; + case "INVOKER_UNSPECIFIED": + case 0: + message.invoker = 0; + break; + case "USER": + case 1: + message.invoker = 1; + break; + case "DEPLOY_AUTOMATION": + case 2: + message.invoker = 2; + break; + } + if (object.deployPolicy != null) + message.deployPolicy = String(object.deployPolicy); + if (object.deployPolicyUid != null) + message.deployPolicyUid = String(object.deployPolicyUid); + if (object.allowed != null) + message.allowed = Boolean(object.allowed); + switch (object.verdict) { + default: + if (typeof object.verdict === "number") { + message.verdict = object.verdict; + break; + } + break; + case "POLICY_VERDICT_UNSPECIFIED": + case 0: + message.verdict = 0; + break; + case "ALLOWED_BY_POLICY": + case 1: + message.verdict = 1; + break; + case "DENIED_BY_POLICY": + case 2: + message.verdict = 2; + break; + } + if (object.overrides) { + if (!Array.isArray(object.overrides)) + throw TypeError(".google.cloud.deploy.v1.DeployPolicyEvaluationEvent.overrides: array expected"); + message.overrides = []; + for (var i = 0; i < object.overrides.length; ++i) + switch (object.overrides[i]) { + default: + if (typeof object.overrides[i] === "number") { + message.overrides[i] = object.overrides[i]; + break; + } + case "POLICY_VERDICT_OVERRIDE_UNSPECIFIED": + case 0: + message.overrides[i] = 0; + break; + case "POLICY_OVERRIDDEN": + case 1: + message.overrides[i] = 1; + break; + case "POLICY_SUSPENDED": + case 2: + message.overrides[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a DeployPolicyEvaluationEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @static + * @param {google.cloud.deploy.v1.DeployPolicyEvaluationEvent} message DeployPolicyEvaluationEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployPolicyEvaluationEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.overrides = []; + if (options.defaults) { + object.message = ""; + object.ruleType = ""; + object.rule = ""; + object.pipelineUid = ""; + object.deliveryPipeline = ""; + object.targetUid = ""; + object.target = ""; + object.invoker = options.enums === String ? "INVOKER_UNSPECIFIED" : 0; + object.deployPolicy = ""; + object.deployPolicyUid = ""; + object.allowed = false; + object.verdict = options.enums === String ? "POLICY_VERDICT_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.ruleType != null && message.hasOwnProperty("ruleType")) + object.ruleType = message.ruleType; + if (message.rule != null && message.hasOwnProperty("rule")) + object.rule = message.rule; + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + object.pipelineUid = message.pipelineUid; + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) + object.deliveryPipeline = message.deliveryPipeline; + if (message.targetUid != null && message.hasOwnProperty("targetUid")) + object.targetUid = message.targetUid; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.invoker != null && message.hasOwnProperty("invoker")) + object.invoker = options.enums === String ? $root.google.cloud.deploy.v1.DeployPolicy.Invoker[message.invoker] === undefined ? message.invoker : $root.google.cloud.deploy.v1.DeployPolicy.Invoker[message.invoker] : message.invoker; + if (message.deployPolicy != null && message.hasOwnProperty("deployPolicy")) + object.deployPolicy = message.deployPolicy; + if (message.deployPolicyUid != null && message.hasOwnProperty("deployPolicyUid")) + object.deployPolicyUid = message.deployPolicyUid; + if (message.allowed != null && message.hasOwnProperty("allowed")) + object.allowed = message.allowed; + if (message.verdict != null && message.hasOwnProperty("verdict")) + object.verdict = options.enums === String ? $root.google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdict[message.verdict] === undefined ? message.verdict : $root.google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdict[message.verdict] : message.verdict; + if (message.overrides && message.overrides.length) { + object.overrides = []; + for (var j = 0; j < message.overrides.length; ++j) + object.overrides[j] = options.enums === String ? $root.google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdictOverride[message.overrides[j]] === undefined ? message.overrides[j] : $root.google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdictOverride[message.overrides[j]] : message.overrides[j]; + } + return object; + }; + + /** + * Converts this DeployPolicyEvaluationEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @instance + * @returns {Object.} JSON object + */ + DeployPolicyEvaluationEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployPolicyEvaluationEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeployPolicyEvaluationEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployPolicyEvaluationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeployPolicyEvaluationEvent"; + }; + + /** + * PolicyVerdict enum. + * @name google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdict + * @enum {number} + * @property {number} POLICY_VERDICT_UNSPECIFIED=0 POLICY_VERDICT_UNSPECIFIED value + * @property {number} ALLOWED_BY_POLICY=1 ALLOWED_BY_POLICY value + * @property {number} DENIED_BY_POLICY=2 DENIED_BY_POLICY value + */ + DeployPolicyEvaluationEvent.PolicyVerdict = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "POLICY_VERDICT_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALLOWED_BY_POLICY"] = 1; + values[valuesById[2] = "DENIED_BY_POLICY"] = 2; + return values; + })(); + + /** + * PolicyVerdictOverride enum. + * @name google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdictOverride + * @enum {number} + * @property {number} POLICY_VERDICT_OVERRIDE_UNSPECIFIED=0 POLICY_VERDICT_OVERRIDE_UNSPECIFIED value + * @property {number} POLICY_OVERRIDDEN=1 POLICY_OVERRIDDEN value + * @property {number} POLICY_SUSPENDED=2 POLICY_SUSPENDED value + */ + DeployPolicyEvaluationEvent.PolicyVerdictOverride = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "POLICY_VERDICT_OVERRIDE_UNSPECIFIED"] = 0; + values[valuesById[1] = "POLICY_OVERRIDDEN"] = 1; + values[valuesById[2] = "POLICY_SUSPENDED"] = 2; + return values; + })(); + + return DeployPolicyEvaluationEvent; + })(); + + v1.DeployPolicyNotificationEvent = (function() { + + /** + * Properties of a DeployPolicyNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @interface IDeployPolicyNotificationEvent + * @property {string|null} [message] DeployPolicyNotificationEvent message + * @property {string|null} [deployPolicy] DeployPolicyNotificationEvent deployPolicy + * @property {string|null} [deployPolicyUid] DeployPolicyNotificationEvent deployPolicyUid + * @property {google.cloud.deploy.v1.Type|null} [type] DeployPolicyNotificationEvent type + */ + + /** + * Constructs a new DeployPolicyNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeployPolicyNotificationEvent. + * @implements IDeployPolicyNotificationEvent + * @constructor + * @param {google.cloud.deploy.v1.IDeployPolicyNotificationEvent=} [properties] Properties to set + */ + function DeployPolicyNotificationEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeployPolicyNotificationEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @instance + */ + DeployPolicyNotificationEvent.prototype.message = ""; + + /** + * DeployPolicyNotificationEvent deployPolicy. + * @member {string} deployPolicy + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @instance + */ + DeployPolicyNotificationEvent.prototype.deployPolicy = ""; + + /** + * DeployPolicyNotificationEvent deployPolicyUid. + * @member {string} deployPolicyUid + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @instance + */ + DeployPolicyNotificationEvent.prototype.deployPolicyUid = ""; + + /** + * DeployPolicyNotificationEvent type. + * @member {google.cloud.deploy.v1.Type} type + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @instance + */ + DeployPolicyNotificationEvent.prototype.type = 0; + + /** + * Creates a new DeployPolicyNotificationEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IDeployPolicyNotificationEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeployPolicyNotificationEvent} DeployPolicyNotificationEvent instance + */ + DeployPolicyNotificationEvent.create = function create(properties) { + return new DeployPolicyNotificationEvent(properties); + }; + + /** + * Encodes the specified DeployPolicyNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.DeployPolicyNotificationEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IDeployPolicyNotificationEvent} message DeployPolicyNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployPolicyNotificationEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.deployPolicy != null && Object.hasOwnProperty.call(message, "deployPolicy")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deployPolicy); + if (message.deployPolicyUid != null && Object.hasOwnProperty.call(message, "deployPolicyUid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deployPolicyUid); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + return writer; + }; + + /** + * Encodes the specified DeployPolicyNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployPolicyNotificationEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IDeployPolicyNotificationEvent} message DeployPolicyNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployPolicyNotificationEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployPolicyNotificationEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeployPolicyNotificationEvent} DeployPolicyNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployPolicyNotificationEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployPolicyNotificationEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.deployPolicy = reader.string(); + break; + } + case 3: { + message.deployPolicyUid = reader.string(); + break; + } + case 4: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployPolicyNotificationEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeployPolicyNotificationEvent} DeployPolicyNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployPolicyNotificationEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployPolicyNotificationEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployPolicyNotificationEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.deployPolicy != null && message.hasOwnProperty("deployPolicy")) + if (!$util.isString(message.deployPolicy)) + return "deployPolicy: string expected"; + if (message.deployPolicyUid != null && message.hasOwnProperty("deployPolicyUid")) + if (!$util.isString(message.deployPolicyUid)) + return "deployPolicyUid: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 3: + case 4: + case 5: + case 6: + case 7: + case 2: + break; + } + return null; + }; + + /** + * Creates a DeployPolicyNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeployPolicyNotificationEvent} DeployPolicyNotificationEvent + */ + DeployPolicyNotificationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeployPolicyNotificationEvent) + return object; + var message = new $root.google.cloud.deploy.v1.DeployPolicyNotificationEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.deployPolicy != null) + message.deployPolicy = String(object.deployPolicy); + if (object.deployPolicyUid != null) + message.deployPolicyUid = String(object.deployPolicyUid); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_PUBSUB_NOTIFICATION_FAILURE": + case 1: + message.type = 1; + break; + case "TYPE_RESOURCE_STATE_CHANGE": + case 3: + message.type = 3; + break; + case "TYPE_PROCESS_ABORTED": + case 4: + message.type = 4; + break; + case "TYPE_RESTRICTION_VIOLATED": + case 5: + message.type = 5; + break; + case "TYPE_RESOURCE_DELETED": + case 6: + message.type = 6; + break; + case "TYPE_ROLLOUT_UPDATE": + case 7: + message.type = 7; + break; + case "TYPE_RENDER_STATUES_CHANGE": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DeployPolicyNotificationEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @static + * @param {google.cloud.deploy.v1.DeployPolicyNotificationEvent} message DeployPolicyNotificationEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployPolicyNotificationEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.deployPolicy = ""; + object.deployPolicyUid = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.deployPolicy != null && message.hasOwnProperty("deployPolicy")) + object.deployPolicy = message.deployPolicy; + if (message.deployPolicyUid != null && message.hasOwnProperty("deployPolicyUid")) + object.deployPolicyUid = message.deployPolicyUid; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.deploy.v1.Type[message.type] === undefined ? message.type : $root.google.cloud.deploy.v1.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this DeployPolicyNotificationEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @instance + * @returns {Object.} JSON object + */ + DeployPolicyNotificationEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployPolicyNotificationEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeployPolicyNotificationEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployPolicyNotificationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeployPolicyNotificationEvent"; + }; + + return DeployPolicyNotificationEvent; + })(); + v1.JobRunNotificationEvent = (function() { /** diff --git a/packages/google-cloud-deploy/protos/protos.json b/packages/google-cloud-deploy/protos/protos.json index adb683cb846..2a84a8d0060 100644 --- a/packages/google-cloud-deploy/protos/protos.json +++ b/packages/google-cloud-deploy/protos/protos.json @@ -5814,7 +5814,8 @@ "CANCELLED": 2, "FAILED": 3, "IN_PROGRESS": 4, - "PENDING": 5 + "PENDING": 5, + "ABORTED": 6 } } } @@ -6138,6 +6139,26 @@ "REPAIR_STATE_SKIPPED": 6 } }, + "CustomTargetTypeNotificationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "customTargetTypeUid": { + "type": "string", + "id": 4 + }, + "customTargetType": { + "type": "string", + "id": 2 + }, + "type": { + "type": "Type", + "id": 3 + } + } + }, "DeliveryPipelineNotificationEvent": { "fields": { "message": { @@ -6158,6 +6179,99 @@ } } }, + "DeployPolicyEvaluationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "ruleType": { + "type": "string", + "id": 2 + }, + "rule": { + "type": "string", + "id": 3 + }, + "pipelineUid": { + "type": "string", + "id": 4 + }, + "deliveryPipeline": { + "type": "string", + "id": 5 + }, + "targetUid": { + "type": "string", + "id": 6 + }, + "target": { + "type": "string", + "id": 7 + }, + "invoker": { + "type": "DeployPolicy.Invoker", + "id": 8 + }, + "deployPolicy": { + "type": "string", + "id": 9 + }, + "deployPolicyUid": { + "type": "string", + "id": 10 + }, + "allowed": { + "type": "bool", + "id": 11 + }, + "verdict": { + "type": "PolicyVerdict", + "id": 12 + }, + "overrides": { + "rule": "repeated", + "type": "PolicyVerdictOverride", + "id": 13 + } + }, + "nested": { + "PolicyVerdict": { + "values": { + "POLICY_VERDICT_UNSPECIFIED": 0, + "ALLOWED_BY_POLICY": 1, + "DENIED_BY_POLICY": 2 + } + }, + "PolicyVerdictOverride": { + "values": { + "POLICY_VERDICT_OVERRIDE_UNSPECIFIED": 0, + "POLICY_OVERRIDDEN": 1, + "POLICY_SUSPENDED": 2 + } + } + } + }, + "DeployPolicyNotificationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "deployPolicy": { + "type": "string", + "id": 2 + }, + "deployPolicyUid": { + "type": "string", + "id": 3 + }, + "type": { + "type": "Type", + "id": 4 + } + } + }, "JobRunNotificationEvent": { "fields": { "message": { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_automation.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_automation.js index b8688e55867..102a503955d 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_automation.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_automation.js @@ -29,8 +29,8 @@ function main(parent, automationId, automation) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent collection in which the `Automation` should be - * created. Format should be + * Required. The parent collection in which the `Automation` must be created. + * The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. */ // const parent = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_custom_target_type.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_custom_target_type.js index 00b77b194b0..fb20991f3aa 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_custom_target_type.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_custom_target_type.js @@ -29,9 +29,8 @@ function main(parent, customTargetTypeId, customTargetType) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent collection in which the `CustomTargetType` should be - * created. Format should be - * `projects/{project_id}/locations/{location_name}`. + * Required. The parent collection in which the `CustomTargetType` must be + * created. The format is `projects/{project_id}/locations/{location_name}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js index 77892f08deb..78525425fc1 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js @@ -29,9 +29,8 @@ function main(parent, deliveryPipelineId, deliveryPipeline) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent collection in which the `DeliveryPipeline` should be - * created. Format should be - * `projects/{project_id}/locations/{location_name}`. + * Required. The parent collection in which the `DeliveryPipeline` must be + * created. The format is `projects/{project_id}/locations/{location_name}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_deploy_policy.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_deploy_policy.js index 7c5a6240c1e..c350a83c7fa 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_deploy_policy.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_deploy_policy.js @@ -29,9 +29,8 @@ function main(parent, deployPolicyId, deployPolicy) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent collection in which the `DeployPolicy` should be - * created. Format should be - * `projects/{project_id}/locations/{location_name}`. + * Required. The parent collection in which the `DeployPolicy` must be + * created. The format is `projects/{project_id}/locations/{location_name}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js index 03a605f3396..b32cf68f1aa 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js @@ -29,8 +29,8 @@ function main(parent, releaseId, release) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent collection in which the `Release` should be created. - * Format should be + * Required. The parent collection in which the `Release` is created. + * The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. */ // const parent = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js index 419466738eb..d190ba2179c 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js @@ -29,8 +29,8 @@ function main(parent, rolloutId, rollout) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent collection in which the `Rollout` should be created. - * Format should be + * Required. The parent collection in which the `Rollout` must be created. + * The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. */ // const parent = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js index a07d98dc2f9..3494cf4bb6e 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js @@ -29,8 +29,8 @@ function main(parent, targetId, target) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent collection in which the `Target` should be created. - * Format should be + * Required. The parent collection in which the `Target` must be created. + * The format is * `projects/{project_id}/locations/{location_name}`. */ // const parent = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_automation.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_automation.js index ae45db89a64..aed735cc2f0 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_automation.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_automation.js @@ -29,7 +29,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the `Automation` to delete. Format should be + * Required. The name of the `Automation` to delete. The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js index b0e3c178d01..ee6c20bbbe7 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js @@ -29,7 +29,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the `DeliveryPipeline` to delete. Format should be + * Required. The name of the `DeliveryPipeline` to delete. The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_deploy_policy.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_deploy_policy.js index 828158e0235..a8b3632d0ae 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_deploy_policy.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_deploy_policy.js @@ -29,7 +29,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the `DeployPolicy` to delete. Format should be + * Required. The name of the `DeployPolicy` to delete. The format is * `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js index 0b71502feb1..44b882d700b 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js @@ -29,7 +29,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the `Target` to delete. Format should be + * Required. The name of the `Target` to delete. The format is * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.rollback_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.rollback_target.js index e5255fb5de8..d11a209d745 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.rollback_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.rollback_target.js @@ -29,8 +29,8 @@ function main(name, targetId, rolloutId) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be - * created. Format should be + * Required. The `DeliveryPipeline` for which the rollback `Rollout` must be + * created. The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_automation.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_automation.js index 42150e57dc6..069d12af731 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_automation.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_automation.js @@ -29,11 +29,11 @@ function main(updateMask, automation) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Automation` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it's in the mask. If the - * user doesn't provide a mask then all fields are overwritten. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the `Automation` resource. The fields specified in the + * update_mask are relative to the resource, not the full request. A field + * will be overwritten if it's in the mask. If the user doesn't provide a mask + * then all fields are overwritten. */ // const updateMask = {} /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_custom_target_type.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_custom_target_type.js index def610648b2..c372b4c71d0 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_custom_target_type.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_custom_target_type.js @@ -29,11 +29,11 @@ function main(updateMask, customTargetType) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `CustomTargetType` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it's in the mask. If the - * user doesn't provide a mask then all fields are overwritten. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the `CustomTargetType` resource. The fields specified in the + * update_mask are relative to the resource, not the full request. A field + * will be overwritten if it's in the mask. If the user doesn't provide a mask + * then all fields are overwritten. */ // const updateMask = {} /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js index 13dbc4177e6..1ff9355e2d8 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js @@ -29,11 +29,11 @@ function main(updateMask, deliveryPipeline) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `DeliveryPipeline` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it's in the mask. If the - * user doesn't provide a mask then all fields are overwritten. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the `DeliveryPipeline` resource. The fields specified in the + * update_mask are relative to the resource, not the full request. A field + * will be overwritten if it's in the mask. If the user doesn't provide a mask + * then all fields are overwritten. */ // const updateMask = {} /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_deploy_policy.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_deploy_policy.js index 64823ebc320..99e23746359 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_deploy_policy.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_deploy_policy.js @@ -29,11 +29,11 @@ function main(updateMask, deployPolicy) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `DeployPolicy` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it's in the mask. If the - * user doesn't provide a mask then all fields are overwritten. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the `DeployPolicy` resource. The fields specified in the + * update_mask are relative to the resource, not the full request. A field + * will be overwritten if it's in the mask. If the user doesn't provide a mask + * then all fields are overwritten. */ // const updateMask = {} /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js index 913ab25718c..36a939b1b87 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js @@ -29,11 +29,11 @@ function main(updateMask, target) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Target resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it's in the mask. If the - * user doesn't provide a mask then all fields are overwritten. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the `Target` resource. The fields specified in the update_mask + * are relative to the resource, not the full request. A field will be + * overwritten if it's in the mask. If the user doesn't provide a mask then + * all fields are overwritten. */ // const updateMask = {} /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json index fd865c9113f..c838bbd45ff 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 85, + "end": 84, "type": "FULL" } ], @@ -718,7 +718,7 @@ "segments": [ { "start": 25, - "end": 85, + "end": 84, "type": "FULL" } ], @@ -1082,7 +1082,7 @@ "segments": [ { "start": 25, - "end": 85, + "end": 84, "type": "FULL" } ], diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index aaa76b2e195..6ec9b4b759d 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -925,8 +925,8 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be - * created. Format should be + * Required. The `DeliveryPipeline` for which the rollback `Rollout` must be + * created. The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. * @param {string} request.targetId * Required. ID of the `Target` that is being rolled back. @@ -2506,9 +2506,8 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection in which the `DeliveryPipeline` should be - * created. Format should be - * `projects/{project_id}/locations/{location_name}`. + * Required. The parent collection in which the `DeliveryPipeline` must be + * created. The format is `projects/{project_id}/locations/{location_name}`. * @param {string} request.deliveryPipelineId * Required. ID of the `DeliveryPipeline`. * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline @@ -2669,11 +2668,11 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * `DeliveryPipeline` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it's in the mask. If the - * user doesn't provide a mask then all fields are overwritten. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the `DeliveryPipeline` resource. The fields specified in the + * update_mask are relative to the resource, not the full request. A field + * will be overwritten if it's in the mask. If the user doesn't provide a mask + * then all fields are overwritten. * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline * Required. The `DeliveryPipeline` to update. * @param {string} [request.requestId] @@ -2835,7 +2834,7 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the `DeliveryPipeline` to delete. Format should be + * Required. The name of the `DeliveryPipeline` to delete. The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. * @param {string} [request.requestId] * Optional. A request ID to identify requests. Specify a unique request ID @@ -3004,8 +3003,8 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection in which the `Target` should be created. - * Format should be + * Required. The parent collection in which the `Target` must be created. + * The format is * `projects/{project_id}/locations/{location_name}`. * @param {string} request.targetId * Required. ID of the `Target`. @@ -3163,11 +3162,11 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * Target resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it's in the mask. If the - * user doesn't provide a mask then all fields are overwritten. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the `Target` resource. The fields specified in the update_mask + * are relative to the resource, not the full request. A field will be + * overwritten if it's in the mask. If the user doesn't provide a mask then + * all fields are overwritten. * @param {google.cloud.deploy.v1.Target} request.target * Required. The `Target` to update. * @param {string} [request.requestId] @@ -3325,7 +3324,7 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the `Target` to delete. Format should be + * Required. The name of the `Target` to delete. The format is * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. * @param {string} [request.requestId] * Optional. A request ID to identify requests. Specify a unique request ID @@ -3486,9 +3485,8 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection in which the `CustomTargetType` should be - * created. Format should be - * `projects/{project_id}/locations/{location_name}`. + * Required. The parent collection in which the `CustomTargetType` must be + * created. The format is `projects/{project_id}/locations/{location_name}`. * @param {string} request.customTargetTypeId * Required. ID of the `CustomTargetType`. * @param {google.cloud.deploy.v1.CustomTargetType} request.customTargetType @@ -3649,11 +3647,11 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * `CustomTargetType` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it's in the mask. If the - * user doesn't provide a mask then all fields are overwritten. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the `CustomTargetType` resource. The fields specified in the + * update_mask are relative to the resource, not the full request. A field + * will be overwritten if it's in the mask. If the user doesn't provide a mask + * then all fields are overwritten. * @param {google.cloud.deploy.v1.CustomTargetType} request.customTargetType * Required. The `CustomTargetType` to update. * @param {string} [request.requestId] @@ -3980,8 +3978,8 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection in which the `Release` should be created. - * Format should be + * Required. The parent collection in which the `Release` is created. + * The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. * @param {string} request.releaseId * Required. ID of the `Release`. @@ -4142,9 +4140,8 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection in which the `DeployPolicy` should be - * created. Format should be - * `projects/{project_id}/locations/{location_name}`. + * Required. The parent collection in which the `DeployPolicy` must be + * created. The format is `projects/{project_id}/locations/{location_name}`. * @param {string} request.deployPolicyId * Required. ID of the `DeployPolicy`. * @param {google.cloud.deploy.v1.DeployPolicy} request.deployPolicy @@ -4301,11 +4298,11 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * `DeployPolicy` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it's in the mask. If the - * user doesn't provide a mask then all fields are overwritten. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the `DeployPolicy` resource. The fields specified in the + * update_mask are relative to the resource, not the full request. A field + * will be overwritten if it's in the mask. If the user doesn't provide a mask + * then all fields are overwritten. * @param {google.cloud.deploy.v1.DeployPolicy} request.deployPolicy * Required. The `DeployPolicy` to update. * @param {string} [request.requestId] @@ -4463,7 +4460,7 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the `DeployPolicy` to delete. Format should be + * Required. The name of the `DeployPolicy` to delete. The format is * `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`. * @param {string} [request.requestId] * Optional. A request ID to identify requests. Specify a unique request ID @@ -4624,8 +4621,8 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection in which the `Rollout` should be created. - * Format should be + * Required. The parent collection in which the `Rollout` must be created. + * The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. * @param {string} request.rolloutId * Required. ID of the `Rollout`. @@ -4789,8 +4786,8 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection in which the `Automation` should be - * created. Format should be + * Required. The parent collection in which the `Automation` must be created. + * The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. * @param {string} request.automationId * Required. ID of the `Automation`. @@ -4948,11 +4945,11 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * `Automation` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it's in the mask. If the - * user doesn't provide a mask then all fields are overwritten. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the `Automation` resource. The fields specified in the + * update_mask are relative to the resource, not the full request. A field + * will be overwritten if it's in the mask. If the user doesn't provide a mask + * then all fields are overwritten. * @param {google.cloud.deploy.v1.Automation} request.automation * Required. The `Automation` to update. * @param {string} [request.requestId] @@ -5110,7 +5107,7 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the `Automation` to delete. Format should be + * Required. The name of the `Automation` to delete. The format is * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. * @param {string} [request.requestId] * Optional. A request ID to identify requests. Specify a unique request ID diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json b/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json index bbe672c08a4..1083c058a21 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json @@ -2,7 +2,10 @@ "../../protos/google/cloud/deploy/v1/automation_payload.proto", "../../protos/google/cloud/deploy/v1/automationrun_payload.proto", "../../protos/google/cloud/deploy/v1/cloud_deploy.proto", + "../../protos/google/cloud/deploy/v1/customtargettype_notification_payload.proto", "../../protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto", + "../../protos/google/cloud/deploy/v1/deploypolicy_evaluation_payload.proto", + "../../protos/google/cloud/deploy/v1/deploypolicy_notification_payload.proto", "../../protos/google/cloud/deploy/v1/jobrun_notification_payload.proto", "../../protos/google/cloud/deploy/v1/log_enums.proto", "../../protos/google/cloud/deploy/v1/release_notification_payload.proto",