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 4ca425d7c0d..794040bfe5e 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 @@ -785,6 +785,23 @@ message CustomCanaryDeployment { message KubernetesConfig { // Information about the Kubernetes Gateway API service mesh configuration. message GatewayServiceMesh { + // Information about route destinations for the Gateway API service mesh. + message RouteDestinations { + // Required. The clusters where the Gateway API HTTPRoute resource will be + // deployed to. Valid entries include the associated entities IDs + // configured in the Target resource and "@self" to include the Target + // cluster. + repeated string destination_ids = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Whether to propagate the Kubernetes Service to the route + // destination clusters. The Service will always be deployed to the Target + // cluster even if the HTTPRoute is not. This option may be used to + // facilitiate successful DNS lookup in the route destination clusters. + // Can only be set to true if destinations are specified. + bool propagate_service = 2 [(google.api.field_behavior) = OPTIONAL]; + } + // Required. Name of the Gateway API HTTPRoute. string http_route = 1 [(google.api.field_behavior) = REQUIRED]; @@ -811,6 +828,14 @@ message KubernetesConfig { // Optional. The label to use when selecting Pods for the Deployment and // Service resources. This label must already be present in both resources. string pod_selector_label = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Route destinations allow configuring the Gateway API HTTPRoute + // to be deployed to additional clusters. This option is available for + // multi-cluster service mesh set ups that require the route to exist in the + // clusters that call the service. If unspecified, the HTTPRoute will only + // be deployed to the Target cluster. + RouteDestinations route_destinations = 8 + [(google.api.field_behavior) = OPTIONAL]; } // Information about the Kubernetes Service networking configuration. @@ -1247,6 +1272,17 @@ message Target { CustomTarget custom_target = 21 [(google.api.field_behavior) = OPTIONAL]; } + // Optional. Map of entity IDs to their associated entities. Associated + // entities allows specifying places other than the deployment target for + // specific features. For example, the Gateway API canary can be configured to + // deploy the HTTPRoute to a different cluster(s) than the deployment cluster + // using associated entities. An entity ID must consist of lower-case letters, + // numbers, and hyphens, start with a letter and end with a letter or a + // number, and have a max length of 63 characters. In other words, it must + // match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + map associated_entities = 23 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. This checksum is computed by the server based on the value of // other fields, and may be sent on update and delete requests to ensure the // client has an up-to-date value before proceeding. @@ -1442,6 +1478,16 @@ message CustomTarget { ]; } +// Information about entities associated with a `Target`. +message AssociatedEntities { + // Optional. Information specifying GKE clusters as associated entities. + repeated GkeCluster gke_clusters = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information specifying Anthos clusters as associated entities. + repeated AnthosCluster anthos_clusters = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + // The request object for `ListTargets`. message ListTargetsRequest { // Required. The parent, which owns this collection of targets. Format must be @@ -3000,6 +3046,10 @@ message Rollout { // Output only. Names of `Rollouts` that rolled back this `Rollout`. repeated string rolled_back_by_rollouts = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The AutomationRun actively repairing the rollout. + string active_repair_automation_run = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Metadata includes information associated with a `Rollout`. @@ -4163,6 +4213,14 @@ message RepairRolloutRule { // `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. string id = 1 [(google.api.field_behavior) = REQUIRED]; + // Optional. Phases within which jobs are subject to automatic repair actions + // on failure. Proceeds only after phase name matched any one in the list, or + // for all phases if unspecified. This value must consist of lower-case + // letters, numbers, and hyphens, start with a letter and end with a letter or + // a number, and have a max length of 63 characters. In other words, it must + // match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string phases = 7 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Jobs to repair. Proceeds only after job name matched any one in // the list, or for all jobs if unspecified or empty. The phase that includes // the job must match the phase ID specified in `source_phase`. This value @@ -4175,6 +4233,49 @@ message RepairRolloutRule { // Output only. Information around the state of the 'Automation' rule. AutomationRuleCondition condition = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Defines the types of automatic repair phases for failed jobs. + repeated RepairPhaseConfig repair_phases = 8 + [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration of the repair phase. +message RepairPhaseConfig { + // The repair phase to perform. + oneof repair_phase { + // Optional. Retries a failed job. + Retry retry = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Rolls back a `Rollout`. + Rollback rollback = 2 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Retries the failed job. +message Retry { + // Required. Total number of retries. Retry is skipped if set to 0; The + // minimum value is 1, and the maximum value is 10. + int64 attempts = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. How long to wait for the first retry. Default is 0, and the + // maximum value is 14d. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The pattern of how wait time will be increased. Default is + // linear. Backoff mode will be ignored if `wait` is 0. + BackoffMode backoff_mode = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Rolls back a `Rollout`. +message Rollback { + // Optional. The starting phase ID for the `Rollout`. If unspecified, the + // `Rollout` will start in the stable phase. + string destination_phase = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If pending rollout exists on the target, the rollback operation + // will be aborted. + bool disable_rollback_if_rollout_pending = 2 + [(google.api.field_behavior) = OPTIONAL]; } // `AutomationRuleCondition` contains conditions relevant to an @@ -4506,6 +4607,10 @@ message RepairRolloutOperation { // Output only. The name of the rollout that initiates the `AutomationRun`. string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The index of the current repair action in the repair sequence. + int64 current_repair_phase_index = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Records of the repair attempts. Each repair phase may have // multiple retry attempts or single rollback attempt. repeated RepairPhase repair_phases = 3 @@ -4575,6 +4680,10 @@ message RollbackAttempt { // Output only. Description of the state of the Rollback. string state_desc = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If active rollout exists on the target, abort this rollback. + bool disable_rollback_if_rollout_pending = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The request object for `ListAutomationRuns`. diff --git a/packages/google-cloud-deploy/protos/protos.d.ts b/packages/google-cloud-deploy/protos/protos.d.ts index c32c4e74716..44de974301a 100644 --- a/packages/google-cloud-deploy/protos/protos.d.ts +++ b/packages/google-cloud-deploy/protos/protos.d.ts @@ -2722,6 +2722,9 @@ export namespace google { /** GatewayServiceMesh podSelectorLabel */ podSelectorLabel?: (string|null); + + /** GatewayServiceMesh routeDestinations */ + routeDestinations?: (google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations|null); } /** Represents a GatewayServiceMesh. */ @@ -2751,6 +2754,9 @@ export namespace google { /** GatewayServiceMesh podSelectorLabel. */ public podSelectorLabel: string; + /** GatewayServiceMesh routeDestinations. */ + public routeDestinations?: (google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations|null); + /** * Creates a new GatewayServiceMesh instance using the specified properties. * @param [properties] Properties to set @@ -2829,6 +2835,112 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace GatewayServiceMesh { + + /** Properties of a RouteDestinations. */ + interface IRouteDestinations { + + /** RouteDestinations destinationIds */ + destinationIds?: (string[]|null); + + /** RouteDestinations propagateService */ + propagateService?: (boolean|null); + } + + /** Represents a RouteDestinations. */ + class RouteDestinations implements IRouteDestinations { + + /** + * Constructs a new RouteDestinations. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations); + + /** RouteDestinations destinationIds. */ + public destinationIds: string[]; + + /** RouteDestinations propagateService. */ + public propagateService: boolean; + + /** + * Creates a new RouteDestinations instance using the specified properties. + * @param [properties] Properties to set + * @returns RouteDestinations instance + */ + public static create(properties?: google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations): google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations; + + /** + * Encodes the specified RouteDestinations message. Does not implicitly {@link google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations.verify|verify} messages. + * @param message RouteDestinations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RouteDestinations message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations.verify|verify} messages. + * @param message RouteDestinations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RouteDestinations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RouteDestinations + * @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.KubernetesConfig.GatewayServiceMesh.RouteDestinations; + + /** + * Decodes a RouteDestinations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RouteDestinations + * @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.KubernetesConfig.GatewayServiceMesh.RouteDestinations; + + /** + * Verifies a RouteDestinations 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 RouteDestinations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RouteDestinations + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations; + + /** + * Creates a plain object from a RouteDestinations message. Also converts values to other types if specified. + * @param message RouteDestinations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RouteDestinations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RouteDestinations + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a ServiceNetworking. */ interface IServiceNetworking { @@ -4670,6 +4782,9 @@ export namespace google { /** Target customTarget */ customTarget?: (google.cloud.deploy.v1.ICustomTarget|null); + /** Target associatedEntities */ + associatedEntities?: ({ [k: string]: google.cloud.deploy.v1.IAssociatedEntities }|null); + /** Target etag */ etag?: (string|null); @@ -4731,6 +4846,9 @@ export namespace google { /** Target customTarget. */ public customTarget?: (google.cloud.deploy.v1.ICustomTarget|null); + /** Target associatedEntities. */ + public associatedEntities: { [k: string]: google.cloud.deploy.v1.IAssociatedEntities }; + /** Target etag. */ public etag: string; @@ -5685,6 +5803,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an AssociatedEntities. */ + interface IAssociatedEntities { + + /** AssociatedEntities gkeClusters */ + gkeClusters?: (google.cloud.deploy.v1.IGkeCluster[]|null); + + /** AssociatedEntities anthosClusters */ + anthosClusters?: (google.cloud.deploy.v1.IAnthosCluster[]|null); + } + + /** Represents an AssociatedEntities. */ + class AssociatedEntities implements IAssociatedEntities { + + /** + * Constructs a new AssociatedEntities. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAssociatedEntities); + + /** AssociatedEntities gkeClusters. */ + public gkeClusters: google.cloud.deploy.v1.IGkeCluster[]; + + /** AssociatedEntities anthosClusters. */ + public anthosClusters: google.cloud.deploy.v1.IAnthosCluster[]; + + /** + * Creates a new AssociatedEntities instance using the specified properties. + * @param [properties] Properties to set + * @returns AssociatedEntities instance + */ + public static create(properties?: google.cloud.deploy.v1.IAssociatedEntities): google.cloud.deploy.v1.AssociatedEntities; + + /** + * Encodes the specified AssociatedEntities message. Does not implicitly {@link google.cloud.deploy.v1.AssociatedEntities.verify|verify} messages. + * @param message AssociatedEntities message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAssociatedEntities, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssociatedEntities message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AssociatedEntities.verify|verify} messages. + * @param message AssociatedEntities message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAssociatedEntities, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssociatedEntities message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssociatedEntities + * @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.AssociatedEntities; + + /** + * Decodes an AssociatedEntities message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssociatedEntities + * @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.AssociatedEntities; + + /** + * Verifies an AssociatedEntities 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 an AssociatedEntities message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssociatedEntities + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AssociatedEntities; + + /** + * Creates a plain object from an AssociatedEntities message. Also converts values to other types if specified. + * @param message AssociatedEntities + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AssociatedEntities, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssociatedEntities to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssociatedEntities + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ListTargetsRequest. */ interface IListTargetsRequest { @@ -11557,6 +11778,9 @@ export namespace google { /** Rollout rolledBackByRollouts */ rolledBackByRollouts?: (string[]|null); + + /** Rollout activeRepairAutomationRun */ + activeRepairAutomationRun?: (string|null); } /** Represents a Rollout. */ @@ -11634,6 +11858,9 @@ export namespace google { /** Rollout rolledBackByRollouts. */ public rolledBackByRollouts: string[]; + /** Rollout activeRepairAutomationRun. */ + public activeRepairAutomationRun: string; + /** * Creates a new Rollout instance using the specified properties. * @param [properties] Properties to set @@ -17629,11 +17856,17 @@ export namespace google { /** RepairRolloutRule id */ id?: (string|null); + /** RepairRolloutRule phases */ + phases?: (string[]|null); + /** RepairRolloutRule jobs */ jobs?: (string[]|null); /** RepairRolloutRule condition */ condition?: (google.cloud.deploy.v1.IAutomationRuleCondition|null); + + /** RepairRolloutRule repairPhases */ + repairPhases?: (google.cloud.deploy.v1.IRepairPhaseConfig[]|null); } /** Represents a RepairRolloutRule. */ @@ -17648,12 +17881,18 @@ export namespace google { /** RepairRolloutRule id. */ public id: string; + /** RepairRolloutRule phases. */ + public phases: string[]; + /** RepairRolloutRule jobs. */ public jobs: string[]; /** RepairRolloutRule condition. */ public condition?: (google.cloud.deploy.v1.IAutomationRuleCondition|null); + /** RepairRolloutRule repairPhases. */ + public repairPhases: google.cloud.deploy.v1.IRepairPhaseConfig[]; + /** * Creates a new RepairRolloutRule instance using the specified properties. * @param [properties] Properties to set @@ -17732,6 +17971,324 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a RepairPhaseConfig. */ + interface IRepairPhaseConfig { + + /** RepairPhaseConfig retry */ + retry?: (google.cloud.deploy.v1.IRetry|null); + + /** RepairPhaseConfig rollback */ + rollback?: (google.cloud.deploy.v1.IRollback|null); + } + + /** Represents a RepairPhaseConfig. */ + class RepairPhaseConfig implements IRepairPhaseConfig { + + /** + * Constructs a new RepairPhaseConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRepairPhaseConfig); + + /** RepairPhaseConfig retry. */ + public retry?: (google.cloud.deploy.v1.IRetry|null); + + /** RepairPhaseConfig rollback. */ + public rollback?: (google.cloud.deploy.v1.IRollback|null); + + /** RepairPhaseConfig repairPhase. */ + public repairPhase?: ("retry"|"rollback"); + + /** + * Creates a new RepairPhaseConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RepairPhaseConfig instance + */ + public static create(properties?: google.cloud.deploy.v1.IRepairPhaseConfig): google.cloud.deploy.v1.RepairPhaseConfig; + + /** + * Encodes the specified RepairPhaseConfig message. Does not implicitly {@link google.cloud.deploy.v1.RepairPhaseConfig.verify|verify} messages. + * @param message RepairPhaseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRepairPhaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RepairPhaseConfig message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RepairPhaseConfig.verify|verify} messages. + * @param message RepairPhaseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRepairPhaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RepairPhaseConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RepairPhaseConfig + * @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.RepairPhaseConfig; + + /** + * Decodes a RepairPhaseConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RepairPhaseConfig + * @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.RepairPhaseConfig; + + /** + * Verifies a RepairPhaseConfig 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 RepairPhaseConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RepairPhaseConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RepairPhaseConfig; + + /** + * Creates a plain object from a RepairPhaseConfig message. Also converts values to other types if specified. + * @param message RepairPhaseConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RepairPhaseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RepairPhaseConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RepairPhaseConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Retry. */ + interface IRetry { + + /** Retry attempts */ + attempts?: (number|Long|string|null); + + /** Retry wait */ + wait?: (google.protobuf.IDuration|null); + + /** Retry backoffMode */ + backoffMode?: (google.cloud.deploy.v1.BackoffMode|keyof typeof google.cloud.deploy.v1.BackoffMode|null); + } + + /** Represents a Retry. */ + class Retry implements IRetry { + + /** + * Constructs a new Retry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRetry); + + /** Retry attempts. */ + public attempts: (number|Long|string); + + /** Retry wait. */ + public wait?: (google.protobuf.IDuration|null); + + /** Retry backoffMode. */ + public backoffMode: (google.cloud.deploy.v1.BackoffMode|keyof typeof google.cloud.deploy.v1.BackoffMode); + + /** + * Creates a new Retry instance using the specified properties. + * @param [properties] Properties to set + * @returns Retry instance + */ + public static create(properties?: google.cloud.deploy.v1.IRetry): google.cloud.deploy.v1.Retry; + + /** + * Encodes the specified Retry message. Does not implicitly {@link google.cloud.deploy.v1.Retry.verify|verify} messages. + * @param message Retry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRetry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Retry message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Retry.verify|verify} messages. + * @param message Retry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRetry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Retry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Retry + * @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.Retry; + + /** + * Decodes a Retry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Retry + * @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.Retry; + + /** + * Verifies a Retry 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 Retry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Retry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Retry; + + /** + * Creates a plain object from a Retry message. Also converts values to other types if specified. + * @param message Retry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Retry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Retry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Retry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Rollback. */ + interface IRollback { + + /** Rollback destinationPhase */ + destinationPhase?: (string|null); + + /** Rollback disableRollbackIfRolloutPending */ + disableRollbackIfRolloutPending?: (boolean|null); + } + + /** Represents a Rollback. */ + class Rollback implements IRollback { + + /** + * Constructs a new Rollback. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRollback); + + /** Rollback destinationPhase. */ + public destinationPhase: string; + + /** Rollback disableRollbackIfRolloutPending. */ + public disableRollbackIfRolloutPending: boolean; + + /** + * Creates a new Rollback instance using the specified properties. + * @param [properties] Properties to set + * @returns Rollback instance + */ + public static create(properties?: google.cloud.deploy.v1.IRollback): google.cloud.deploy.v1.Rollback; + + /** + * Encodes the specified Rollback message. Does not implicitly {@link google.cloud.deploy.v1.Rollback.verify|verify} messages. + * @param message Rollback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRollback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rollback message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Rollback.verify|verify} messages. + * @param message Rollback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRollback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rollback message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rollback + * @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.Rollback; + + /** + * Decodes a Rollback message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rollback + * @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.Rollback; + + /** + * Verifies a Rollback 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 Rollback message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rollback + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Rollback; + + /** + * Creates a plain object from a Rollback message. Also converts values to other types if specified. + * @param message Rollback + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Rollback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rollback to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rollback + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an AutomationRuleCondition. */ interface IAutomationRuleCondition { @@ -18965,6 +19522,9 @@ export namespace google { /** RepairRolloutOperation rollout */ rollout?: (string|null); + /** RepairRolloutOperation currentRepairPhaseIndex */ + currentRepairPhaseIndex?: (number|Long|string|null); + /** RepairRolloutOperation repairPhases */ repairPhases?: (google.cloud.deploy.v1.IRepairPhase[]|null); @@ -18987,6 +19547,9 @@ export namespace google { /** RepairRolloutOperation rollout. */ public rollout: string; + /** RepairRolloutOperation currentRepairPhaseIndex. */ + public currentRepairPhaseIndex: (number|Long|string); + /** RepairRolloutOperation repairPhases. */ public repairPhases: google.cloud.deploy.v1.IRepairPhase[]; @@ -19418,6 +19981,9 @@ export namespace google { /** RollbackAttempt stateDesc */ stateDesc?: (string|null); + + /** RollbackAttempt disableRollbackIfRolloutPending */ + disableRollbackIfRolloutPending?: (boolean|null); } /** Represents a RollbackAttempt. */ @@ -19441,6 +20007,9 @@ export namespace google { /** RollbackAttempt stateDesc. */ public stateDesc: string; + /** RollbackAttempt disableRollbackIfRolloutPending. */ + public disableRollbackIfRolloutPending: boolean; + /** * Creates a new RollbackAttempt instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-deploy/protos/protos.js b/packages/google-cloud-deploy/protos/protos.js index 14fcbfecf4d..a117ec115ef 100644 --- a/packages/google-cloud-deploy/protos/protos.js +++ b/packages/google-cloud-deploy/protos/protos.js @@ -6119,6 +6119,7 @@ * @property {google.protobuf.IDuration|null} [routeUpdateWaitTime] GatewayServiceMesh routeUpdateWaitTime * @property {google.protobuf.IDuration|null} [stableCutbackDuration] GatewayServiceMesh stableCutbackDuration * @property {string|null} [podSelectorLabel] GatewayServiceMesh podSelectorLabel + * @property {google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations|null} [routeDestinations] GatewayServiceMesh routeDestinations */ /** @@ -6184,6 +6185,14 @@ */ GatewayServiceMesh.prototype.podSelectorLabel = ""; + /** + * GatewayServiceMesh routeDestinations. + * @member {google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations|null|undefined} routeDestinations + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh + * @instance + */ + GatewayServiceMesh.prototype.routeDestinations = null; + /** * Creates a new GatewayServiceMesh instance using the specified properties. * @function create @@ -6220,6 +6229,8 @@ $root.google.protobuf.Duration.encode(message.stableCutbackDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.podSelectorLabel != null && Object.hasOwnProperty.call(message, "podSelectorLabel")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.podSelectorLabel); + if (message.routeDestinations != null && Object.hasOwnProperty.call(message, "routeDestinations")) + $root.google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations.encode(message.routeDestinations, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -6278,6 +6289,10 @@ message.podSelectorLabel = reader.string(); break; } + case 8: { + message.routeDestinations = $root.google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6335,6 +6350,11 @@ if (message.podSelectorLabel != null && message.hasOwnProperty("podSelectorLabel")) if (!$util.isString(message.podSelectorLabel)) return "podSelectorLabel: string expected"; + if (message.routeDestinations != null && message.hasOwnProperty("routeDestinations")) { + var error = $root.google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations.verify(message.routeDestinations); + if (error) + return "routeDestinations." + error; + } return null; }; @@ -6368,6 +6388,11 @@ } if (object.podSelectorLabel != null) message.podSelectorLabel = String(object.podSelectorLabel); + if (object.routeDestinations != null) { + if (typeof object.routeDestinations !== "object") + throw TypeError(".google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.routeDestinations: object expected"); + message.routeDestinations = $root.google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations.fromObject(object.routeDestinations); + } return message; }; @@ -6391,6 +6416,7 @@ object.routeUpdateWaitTime = null; object.stableCutbackDuration = null; object.podSelectorLabel = ""; + object.routeDestinations = null; } if (message.httpRoute != null && message.hasOwnProperty("httpRoute")) object.httpRoute = message.httpRoute; @@ -6404,6 +6430,8 @@ object.stableCutbackDuration = $root.google.protobuf.Duration.toObject(message.stableCutbackDuration, options); if (message.podSelectorLabel != null && message.hasOwnProperty("podSelectorLabel")) object.podSelectorLabel = message.podSelectorLabel; + if (message.routeDestinations != null && message.hasOwnProperty("routeDestinations")) + object.routeDestinations = $root.google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations.toObject(message.routeDestinations, options); return object; }; @@ -6433,6 +6461,249 @@ return typeUrlPrefix + "/google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh"; }; + GatewayServiceMesh.RouteDestinations = (function() { + + /** + * Properties of a RouteDestinations. + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh + * @interface IRouteDestinations + * @property {Array.|null} [destinationIds] RouteDestinations destinationIds + * @property {boolean|null} [propagateService] RouteDestinations propagateService + */ + + /** + * Constructs a new RouteDestinations. + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh + * @classdesc Represents a RouteDestinations. + * @implements IRouteDestinations + * @constructor + * @param {google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations=} [properties] Properties to set + */ + function RouteDestinations(properties) { + this.destinationIds = []; + 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]]; + } + + /** + * RouteDestinations destinationIds. + * @member {Array.} destinationIds + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @instance + */ + RouteDestinations.prototype.destinationIds = $util.emptyArray; + + /** + * RouteDestinations propagateService. + * @member {boolean} propagateService + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @instance + */ + RouteDestinations.prototype.propagateService = false; + + /** + * Creates a new RouteDestinations instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @static + * @param {google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations} RouteDestinations instance + */ + RouteDestinations.create = function create(properties) { + return new RouteDestinations(properties); + }; + + /** + * Encodes the specified RouteDestinations message. Does not implicitly {@link google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @static + * @param {google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations} message RouteDestinations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RouteDestinations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinationIds != null && message.destinationIds.length) + for (var i = 0; i < message.destinationIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationIds[i]); + if (message.propagateService != null && Object.hasOwnProperty.call(message, "propagateService")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.propagateService); + return writer; + }; + + /** + * Encodes the specified RouteDestinations message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @static + * @param {google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.IRouteDestinations} message RouteDestinations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RouteDestinations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RouteDestinations message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @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.KubernetesConfig.GatewayServiceMesh.RouteDestinations} RouteDestinations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RouteDestinations.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.KubernetesConfig.GatewayServiceMesh.RouteDestinations(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.destinationIds && message.destinationIds.length)) + message.destinationIds = []; + message.destinationIds.push(reader.string()); + break; + } + case 2: { + message.propagateService = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RouteDestinations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations} RouteDestinations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RouteDestinations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RouteDestinations message. + * @function verify + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RouteDestinations.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.destinationIds != null && message.hasOwnProperty("destinationIds")) { + if (!Array.isArray(message.destinationIds)) + return "destinationIds: array expected"; + for (var i = 0; i < message.destinationIds.length; ++i) + if (!$util.isString(message.destinationIds[i])) + return "destinationIds: string[] expected"; + } + if (message.propagateService != null && message.hasOwnProperty("propagateService")) + if (typeof message.propagateService !== "boolean") + return "propagateService: boolean expected"; + return null; + }; + + /** + * Creates a RouteDestinations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations} RouteDestinations + */ + RouteDestinations.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations) + return object; + var message = new $root.google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations(); + if (object.destinationIds) { + if (!Array.isArray(object.destinationIds)) + throw TypeError(".google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations.destinationIds: array expected"); + message.destinationIds = []; + for (var i = 0; i < object.destinationIds.length; ++i) + message.destinationIds[i] = String(object.destinationIds[i]); + } + if (object.propagateService != null) + message.propagateService = Boolean(object.propagateService); + return message; + }; + + /** + * Creates a plain object from a RouteDestinations message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @static + * @param {google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations} message RouteDestinations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RouteDestinations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinationIds = []; + if (options.defaults) + object.propagateService = false; + if (message.destinationIds && message.destinationIds.length) { + object.destinationIds = []; + for (var j = 0; j < message.destinationIds.length; ++j) + object.destinationIds[j] = message.destinationIds[j]; + } + if (message.propagateService != null && message.hasOwnProperty("propagateService")) + object.propagateService = message.propagateService; + return object; + }; + + /** + * Converts this RouteDestinations to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @instance + * @returns {Object.} JSON object + */ + RouteDestinations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RouteDestinations + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RouteDestinations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations"; + }; + + return RouteDestinations; + })(); + return GatewayServiceMesh; })(); @@ -10852,6 +11123,7 @@ * @property {google.cloud.deploy.v1.ICloudRunLocation|null} [run] Target run * @property {google.cloud.deploy.v1.IMultiTarget|null} [multiTarget] Target multiTarget * @property {google.cloud.deploy.v1.ICustomTarget|null} [customTarget] Target customTarget + * @property {Object.|null} [associatedEntities] Target associatedEntities * @property {string|null} [etag] Target etag * @property {Array.|null} [executionConfigs] Target executionConfigs * @property {Object.|null} [deployParameters] Target deployParameters @@ -10868,6 +11140,7 @@ function Target(properties) { this.annotations = {}; this.labels = {}; + this.associatedEntities = {}; this.executionConfigs = []; this.deployParameters = {}; if (properties) @@ -10988,6 +11261,14 @@ */ Target.prototype.customTarget = null; + /** + * Target associatedEntities. + * @member {Object.} associatedEntities + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.associatedEntities = $util.emptyObject; + /** * Target etag. * @member {string} etag @@ -11088,6 +11369,11 @@ writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.deployParameters[keys[i]]).ldelim(); if (message.customTarget != null && Object.hasOwnProperty.call(message, "customTarget")) $root.google.cloud.deploy.v1.CustomTarget.encode(message.customTarget, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.associatedEntities != null && Object.hasOwnProperty.call(message, "associatedEntities")) + for (var keys = Object.keys(message.associatedEntities), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 23, wireType 2 =*/186).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.deploy.v1.AssociatedEntities.encode(message.associatedEntities[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; @@ -11216,6 +11502,29 @@ message.customTarget = $root.google.cloud.deploy.v1.CustomTarget.decode(reader, reader.uint32()); break; } + case 23: { + if (message.associatedEntities === $util.emptyObject) + message.associatedEntities = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.deploy.v1.AssociatedEntities.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.associatedEntities[key] = value; + break; + } case 12: { message.etag = reader.string(); break; @@ -11374,6 +11683,16 @@ return "customTarget." + error; } } + if (message.associatedEntities != null && message.hasOwnProperty("associatedEntities")) { + if (!$util.isObject(message.associatedEntities)) + return "associatedEntities: object expected"; + var key = Object.keys(message.associatedEntities); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.deploy.v1.AssociatedEntities.verify(message.associatedEntities[key[i]]); + if (error) + return "associatedEntities." + error; + } + } if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; @@ -11468,6 +11787,16 @@ throw TypeError(".google.cloud.deploy.v1.Target.customTarget: object expected"); message.customTarget = $root.google.cloud.deploy.v1.CustomTarget.fromObject(object.customTarget); } + if (object.associatedEntities) { + if (typeof object.associatedEntities !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.associatedEntities: object expected"); + message.associatedEntities = {}; + for (var keys = Object.keys(object.associatedEntities), i = 0; i < keys.length; ++i) { + if (typeof object.associatedEntities[keys[i]] !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.associatedEntities: object expected"); + message.associatedEntities[keys[i]] = $root.google.cloud.deploy.v1.AssociatedEntities.fromObject(object.associatedEntities[keys[i]]); + } + } if (object.etag != null) message.etag = String(object.etag); if (object.executionConfigs) { @@ -11509,6 +11838,7 @@ object.annotations = {}; object.labels = {}; object.deployParameters = {}; + object.associatedEntities = {}; } if (options.defaults) { object.name = ""; @@ -11582,6 +11912,11 @@ if (options.oneofs) object.deploymentTarget = "customTarget"; } + if (message.associatedEntities && (keys2 = Object.keys(message.associatedEntities)).length) { + object.associatedEntities = {}; + for (var j = 0; j < keys2.length; ++j) + object.associatedEntities[keys2[j]] = $root.google.cloud.deploy.v1.AssociatedEntities.toObject(message.associatedEntities[keys2[j]], options); + } return object; }; @@ -13662,6 +13997,275 @@ return CustomTarget; })(); + v1.AssociatedEntities = (function() { + + /** + * Properties of an AssociatedEntities. + * @memberof google.cloud.deploy.v1 + * @interface IAssociatedEntities + * @property {Array.|null} [gkeClusters] AssociatedEntities gkeClusters + * @property {Array.|null} [anthosClusters] AssociatedEntities anthosClusters + */ + + /** + * Constructs a new AssociatedEntities. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an AssociatedEntities. + * @implements IAssociatedEntities + * @constructor + * @param {google.cloud.deploy.v1.IAssociatedEntities=} [properties] Properties to set + */ + function AssociatedEntities(properties) { + this.gkeClusters = []; + this.anthosClusters = []; + 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]]; + } + + /** + * AssociatedEntities gkeClusters. + * @member {Array.} gkeClusters + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @instance + */ + AssociatedEntities.prototype.gkeClusters = $util.emptyArray; + + /** + * AssociatedEntities anthosClusters. + * @member {Array.} anthosClusters + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @instance + */ + AssociatedEntities.prototype.anthosClusters = $util.emptyArray; + + /** + * Creates a new AssociatedEntities instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @static + * @param {google.cloud.deploy.v1.IAssociatedEntities=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AssociatedEntities} AssociatedEntities instance + */ + AssociatedEntities.create = function create(properties) { + return new AssociatedEntities(properties); + }; + + /** + * Encodes the specified AssociatedEntities message. Does not implicitly {@link google.cloud.deploy.v1.AssociatedEntities.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @static + * @param {google.cloud.deploy.v1.IAssociatedEntities} message AssociatedEntities message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssociatedEntities.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gkeClusters != null && message.gkeClusters.length) + for (var i = 0; i < message.gkeClusters.length; ++i) + $root.google.cloud.deploy.v1.GkeCluster.encode(message.gkeClusters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.anthosClusters != null && message.anthosClusters.length) + for (var i = 0; i < message.anthosClusters.length; ++i) + $root.google.cloud.deploy.v1.AnthosCluster.encode(message.anthosClusters[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AssociatedEntities message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AssociatedEntities.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @static + * @param {google.cloud.deploy.v1.IAssociatedEntities} message AssociatedEntities message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssociatedEntities.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AssociatedEntities message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @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.AssociatedEntities} AssociatedEntities + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssociatedEntities.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.AssociatedEntities(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.gkeClusters && message.gkeClusters.length)) + message.gkeClusters = []; + message.gkeClusters.push($root.google.cloud.deploy.v1.GkeCluster.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.anthosClusters && message.anthosClusters.length)) + message.anthosClusters = []; + message.anthosClusters.push($root.google.cloud.deploy.v1.AnthosCluster.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AssociatedEntities message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.AssociatedEntities} AssociatedEntities + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssociatedEntities.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AssociatedEntities message. + * @function verify + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssociatedEntities.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gkeClusters != null && message.hasOwnProperty("gkeClusters")) { + if (!Array.isArray(message.gkeClusters)) + return "gkeClusters: array expected"; + for (var i = 0; i < message.gkeClusters.length; ++i) { + var error = $root.google.cloud.deploy.v1.GkeCluster.verify(message.gkeClusters[i]); + if (error) + return "gkeClusters." + error; + } + } + if (message.anthosClusters != null && message.hasOwnProperty("anthosClusters")) { + if (!Array.isArray(message.anthosClusters)) + return "anthosClusters: array expected"; + for (var i = 0; i < message.anthosClusters.length; ++i) { + var error = $root.google.cloud.deploy.v1.AnthosCluster.verify(message.anthosClusters[i]); + if (error) + return "anthosClusters." + error; + } + } + return null; + }; + + /** + * Creates an AssociatedEntities message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.AssociatedEntities} AssociatedEntities + */ + AssociatedEntities.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AssociatedEntities) + return object; + var message = new $root.google.cloud.deploy.v1.AssociatedEntities(); + if (object.gkeClusters) { + if (!Array.isArray(object.gkeClusters)) + throw TypeError(".google.cloud.deploy.v1.AssociatedEntities.gkeClusters: array expected"); + message.gkeClusters = []; + for (var i = 0; i < object.gkeClusters.length; ++i) { + if (typeof object.gkeClusters[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.AssociatedEntities.gkeClusters: object expected"); + message.gkeClusters[i] = $root.google.cloud.deploy.v1.GkeCluster.fromObject(object.gkeClusters[i]); + } + } + if (object.anthosClusters) { + if (!Array.isArray(object.anthosClusters)) + throw TypeError(".google.cloud.deploy.v1.AssociatedEntities.anthosClusters: array expected"); + message.anthosClusters = []; + for (var i = 0; i < object.anthosClusters.length; ++i) { + if (typeof object.anthosClusters[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.AssociatedEntities.anthosClusters: object expected"); + message.anthosClusters[i] = $root.google.cloud.deploy.v1.AnthosCluster.fromObject(object.anthosClusters[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AssociatedEntities message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @static + * @param {google.cloud.deploy.v1.AssociatedEntities} message AssociatedEntities + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssociatedEntities.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.gkeClusters = []; + object.anthosClusters = []; + } + if (message.gkeClusters && message.gkeClusters.length) { + object.gkeClusters = []; + for (var j = 0; j < message.gkeClusters.length; ++j) + object.gkeClusters[j] = $root.google.cloud.deploy.v1.GkeCluster.toObject(message.gkeClusters[j], options); + } + if (message.anthosClusters && message.anthosClusters.length) { + object.anthosClusters = []; + for (var j = 0; j < message.anthosClusters.length; ++j) + object.anthosClusters[j] = $root.google.cloud.deploy.v1.AnthosCluster.toObject(message.anthosClusters[j], options); + } + return object; + }; + + /** + * Converts this AssociatedEntities to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @instance + * @returns {Object.} JSON object + */ + AssociatedEntities.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AssociatedEntities + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.AssociatedEntities + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssociatedEntities.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.AssociatedEntities"; + }; + + return AssociatedEntities; + })(); + v1.ListTargetsRequest = (function() { /** @@ -28813,6 +29417,7 @@ * @property {string|null} [controllerRollout] Rollout controllerRollout * @property {string|null} [rollbackOfRollout] Rollout rollbackOfRollout * @property {Array.|null} [rolledBackByRollouts] Rollout rolledBackByRollouts + * @property {string|null} [activeRepairAutomationRun] Rollout activeRepairAutomationRun */ /** @@ -29010,6 +29615,14 @@ */ Rollout.prototype.rolledBackByRollouts = $util.emptyArray; + /** + * Rollout activeRepairAutomationRun. + * @member {string} activeRepairAutomationRun + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.activeRepairAutomationRun = ""; + /** * Creates a new Rollout instance using the specified properties. * @function create @@ -29082,6 +29695,8 @@ if (message.rolledBackByRollouts != null && message.rolledBackByRollouts.length) for (var i = 0; i < message.rolledBackByRollouts.length; ++i) writer.uint32(/* id 27, wireType 2 =*/218).string(message.rolledBackByRollouts[i]); + if (message.activeRepairAutomationRun != null && Object.hasOwnProperty.call(message, "activeRepairAutomationRun")) + writer.uint32(/* id 28, wireType 2 =*/226).string(message.activeRepairAutomationRun); return writer; }; @@ -29246,6 +29861,10 @@ message.rolledBackByRollouts.push(reader.string()); break; } + case 28: { + message.activeRepairAutomationRun = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29413,6 +30032,9 @@ if (!$util.isString(message.rolledBackByRollouts[i])) return "rolledBackByRollouts: string[] expected"; } + if (message.activeRepairAutomationRun != null && message.hasOwnProperty("activeRepairAutomationRun")) + if (!$util.isString(message.activeRepairAutomationRun)) + return "activeRepairAutomationRun: string expected"; return null; }; @@ -29631,6 +30253,8 @@ for (var i = 0; i < object.rolledBackByRollouts.length; ++i) message.rolledBackByRollouts[i] = String(object.rolledBackByRollouts[i]); } + if (object.activeRepairAutomationRun != null) + message.activeRepairAutomationRun = String(object.activeRepairAutomationRun); return message; }; @@ -29674,6 +30298,7 @@ object.metadata = null; object.controllerRollout = ""; object.rollbackOfRollout = ""; + object.activeRepairAutomationRun = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -29732,6 +30357,8 @@ for (var j = 0; j < message.rolledBackByRollouts.length; ++j) object.rolledBackByRollouts[j] = message.rolledBackByRollouts[j]; } + if (message.activeRepairAutomationRun != null && message.hasOwnProperty("activeRepairAutomationRun")) + object.activeRepairAutomationRun = message.activeRepairAutomationRun; return object; }; @@ -44327,8 +44954,10 @@ * @memberof google.cloud.deploy.v1 * @interface IRepairRolloutRule * @property {string|null} [id] RepairRolloutRule id + * @property {Array.|null} [phases] RepairRolloutRule phases * @property {Array.|null} [jobs] RepairRolloutRule jobs * @property {google.cloud.deploy.v1.IAutomationRuleCondition|null} [condition] RepairRolloutRule condition + * @property {Array.|null} [repairPhases] RepairRolloutRule repairPhases */ /** @@ -44340,7 +44969,9 @@ * @param {google.cloud.deploy.v1.IRepairRolloutRule=} [properties] Properties to set */ function RepairRolloutRule(properties) { + this.phases = []; this.jobs = []; + this.repairPhases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44355,6 +44986,14 @@ */ RepairRolloutRule.prototype.id = ""; + /** + * RepairRolloutRule phases. + * @member {Array.} phases + * @memberof google.cloud.deploy.v1.RepairRolloutRule + * @instance + */ + RepairRolloutRule.prototype.phases = $util.emptyArray; + /** * RepairRolloutRule jobs. * @member {Array.} jobs @@ -44371,6 +45010,14 @@ */ RepairRolloutRule.prototype.condition = null; + /** + * RepairRolloutRule repairPhases. + * @member {Array.} repairPhases + * @memberof google.cloud.deploy.v1.RepairRolloutRule + * @instance + */ + RepairRolloutRule.prototype.repairPhases = $util.emptyArray; + /** * Creates a new RepairRolloutRule instance using the specified properties. * @function create @@ -44402,6 +45049,12 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobs[i]); if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) $root.google.cloud.deploy.v1.AutomationRuleCondition.encode(message.condition, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.phases != null && message.phases.length) + for (var i = 0; i < message.phases.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.phases[i]); + if (message.repairPhases != null && message.repairPhases.length) + for (var i = 0; i < message.repairPhases.length; ++i) + $root.google.cloud.deploy.v1.RepairPhaseConfig.encode(message.repairPhases[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -44440,6 +45093,12 @@ message.id = reader.string(); break; } + case 7: { + if (!(message.phases && message.phases.length)) + message.phases = []; + message.phases.push(reader.string()); + break; + } case 3: { if (!(message.jobs && message.jobs.length)) message.jobs = []; @@ -44450,6 +45109,12 @@ message.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.decode(reader, reader.uint32()); break; } + case 8: { + if (!(message.repairPhases && message.repairPhases.length)) + message.repairPhases = []; + message.repairPhases.push($root.google.cloud.deploy.v1.RepairPhaseConfig.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -44488,6 +45153,13 @@ if (message.id != null && message.hasOwnProperty("id")) if (!$util.isString(message.id)) return "id: string expected"; + if (message.phases != null && message.hasOwnProperty("phases")) { + if (!Array.isArray(message.phases)) + return "phases: array expected"; + for (var i = 0; i < message.phases.length; ++i) + if (!$util.isString(message.phases[i])) + return "phases: string[] expected"; + } if (message.jobs != null && message.hasOwnProperty("jobs")) { if (!Array.isArray(message.jobs)) return "jobs: array expected"; @@ -44500,6 +45172,15 @@ if (error) return "condition." + error; } + if (message.repairPhases != null && message.hasOwnProperty("repairPhases")) { + if (!Array.isArray(message.repairPhases)) + return "repairPhases: array expected"; + for (var i = 0; i < message.repairPhases.length; ++i) { + var error = $root.google.cloud.deploy.v1.RepairPhaseConfig.verify(message.repairPhases[i]); + if (error) + return "repairPhases." + error; + } + } return null; }; @@ -44517,6 +45198,13 @@ var message = new $root.google.cloud.deploy.v1.RepairRolloutRule(); if (object.id != null) message.id = String(object.id); + if (object.phases) { + if (!Array.isArray(object.phases)) + throw TypeError(".google.cloud.deploy.v1.RepairRolloutRule.phases: array expected"); + message.phases = []; + for (var i = 0; i < object.phases.length; ++i) + message.phases[i] = String(object.phases[i]); + } if (object.jobs) { if (!Array.isArray(object.jobs)) throw TypeError(".google.cloud.deploy.v1.RepairRolloutRule.jobs: array expected"); @@ -44529,6 +45217,16 @@ throw TypeError(".google.cloud.deploy.v1.RepairRolloutRule.condition: object expected"); message.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.fromObject(object.condition); } + if (object.repairPhases) { + if (!Array.isArray(object.repairPhases)) + throw TypeError(".google.cloud.deploy.v1.RepairRolloutRule.repairPhases: array expected"); + message.repairPhases = []; + for (var i = 0; i < object.repairPhases.length; ++i) { + if (typeof object.repairPhases[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.RepairRolloutRule.repairPhases: object expected"); + message.repairPhases[i] = $root.google.cloud.deploy.v1.RepairPhaseConfig.fromObject(object.repairPhases[i]); + } + } return message; }; @@ -44545,8 +45243,11 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.jobs = []; + object.phases = []; + object.repairPhases = []; + } if (options.defaults) { object.id = ""; object.condition = null; @@ -44560,6 +45261,16 @@ } if (message.condition != null && message.hasOwnProperty("condition")) object.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.toObject(message.condition, options); + if (message.phases && message.phases.length) { + object.phases = []; + for (var j = 0; j < message.phases.length; ++j) + object.phases[j] = message.phases[j]; + } + if (message.repairPhases && message.repairPhases.length) { + object.repairPhases = []; + for (var j = 0; j < message.repairPhases.length; ++j) + object.repairPhases[j] = $root.google.cloud.deploy.v1.RepairPhaseConfig.toObject(message.repairPhases[j], options); + } return object; }; @@ -44592,6 +45303,788 @@ return RepairRolloutRule; })(); + v1.RepairPhaseConfig = (function() { + + /** + * Properties of a RepairPhaseConfig. + * @memberof google.cloud.deploy.v1 + * @interface IRepairPhaseConfig + * @property {google.cloud.deploy.v1.IRetry|null} [retry] RepairPhaseConfig retry + * @property {google.cloud.deploy.v1.IRollback|null} [rollback] RepairPhaseConfig rollback + */ + + /** + * Constructs a new RepairPhaseConfig. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a RepairPhaseConfig. + * @implements IRepairPhaseConfig + * @constructor + * @param {google.cloud.deploy.v1.IRepairPhaseConfig=} [properties] Properties to set + */ + function RepairPhaseConfig(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]]; + } + + /** + * RepairPhaseConfig retry. + * @member {google.cloud.deploy.v1.IRetry|null|undefined} retry + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @instance + */ + RepairPhaseConfig.prototype.retry = null; + + /** + * RepairPhaseConfig rollback. + * @member {google.cloud.deploy.v1.IRollback|null|undefined} rollback + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @instance + */ + RepairPhaseConfig.prototype.rollback = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RepairPhaseConfig repairPhase. + * @member {"retry"|"rollback"|undefined} repairPhase + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @instance + */ + Object.defineProperty(RepairPhaseConfig.prototype, "repairPhase", { + get: $util.oneOfGetter($oneOfFields = ["retry", "rollback"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RepairPhaseConfig instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @static + * @param {google.cloud.deploy.v1.IRepairPhaseConfig=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RepairPhaseConfig} RepairPhaseConfig instance + */ + RepairPhaseConfig.create = function create(properties) { + return new RepairPhaseConfig(properties); + }; + + /** + * Encodes the specified RepairPhaseConfig message. Does not implicitly {@link google.cloud.deploy.v1.RepairPhaseConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @static + * @param {google.cloud.deploy.v1.IRepairPhaseConfig} message RepairPhaseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepairPhaseConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.retry != null && Object.hasOwnProperty.call(message, "retry")) + $root.google.cloud.deploy.v1.Retry.encode(message.retry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rollback != null && Object.hasOwnProperty.call(message, "rollback")) + $root.google.cloud.deploy.v1.Rollback.encode(message.rollback, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RepairPhaseConfig message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RepairPhaseConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @static + * @param {google.cloud.deploy.v1.IRepairPhaseConfig} message RepairPhaseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepairPhaseConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RepairPhaseConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @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.RepairPhaseConfig} RepairPhaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepairPhaseConfig.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.RepairPhaseConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.retry = $root.google.cloud.deploy.v1.Retry.decode(reader, reader.uint32()); + break; + } + case 2: { + message.rollback = $root.google.cloud.deploy.v1.Rollback.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RepairPhaseConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.RepairPhaseConfig} RepairPhaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepairPhaseConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RepairPhaseConfig message. + * @function verify + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RepairPhaseConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.retry != null && message.hasOwnProperty("retry")) { + properties.repairPhase = 1; + { + var error = $root.google.cloud.deploy.v1.Retry.verify(message.retry); + if (error) + return "retry." + error; + } + } + if (message.rollback != null && message.hasOwnProperty("rollback")) { + if (properties.repairPhase === 1) + return "repairPhase: multiple values"; + properties.repairPhase = 1; + { + var error = $root.google.cloud.deploy.v1.Rollback.verify(message.rollback); + if (error) + return "rollback." + error; + } + } + return null; + }; + + /** + * Creates a RepairPhaseConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.RepairPhaseConfig} RepairPhaseConfig + */ + RepairPhaseConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RepairPhaseConfig) + return object; + var message = new $root.google.cloud.deploy.v1.RepairPhaseConfig(); + if (object.retry != null) { + if (typeof object.retry !== "object") + throw TypeError(".google.cloud.deploy.v1.RepairPhaseConfig.retry: object expected"); + message.retry = $root.google.cloud.deploy.v1.Retry.fromObject(object.retry); + } + if (object.rollback != null) { + if (typeof object.rollback !== "object") + throw TypeError(".google.cloud.deploy.v1.RepairPhaseConfig.rollback: object expected"); + message.rollback = $root.google.cloud.deploy.v1.Rollback.fromObject(object.rollback); + } + return message; + }; + + /** + * Creates a plain object from a RepairPhaseConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @static + * @param {google.cloud.deploy.v1.RepairPhaseConfig} message RepairPhaseConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RepairPhaseConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.retry != null && message.hasOwnProperty("retry")) { + object.retry = $root.google.cloud.deploy.v1.Retry.toObject(message.retry, options); + if (options.oneofs) + object.repairPhase = "retry"; + } + if (message.rollback != null && message.hasOwnProperty("rollback")) { + object.rollback = $root.google.cloud.deploy.v1.Rollback.toObject(message.rollback, options); + if (options.oneofs) + object.repairPhase = "rollback"; + } + return object; + }; + + /** + * Converts this RepairPhaseConfig to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @instance + * @returns {Object.} JSON object + */ + RepairPhaseConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RepairPhaseConfig + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.RepairPhaseConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RepairPhaseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.RepairPhaseConfig"; + }; + + return RepairPhaseConfig; + })(); + + v1.Retry = (function() { + + /** + * Properties of a Retry. + * @memberof google.cloud.deploy.v1 + * @interface IRetry + * @property {number|Long|null} [attempts] Retry attempts + * @property {google.protobuf.IDuration|null} [wait] Retry wait + * @property {google.cloud.deploy.v1.BackoffMode|null} [backoffMode] Retry backoffMode + */ + + /** + * Constructs a new Retry. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Retry. + * @implements IRetry + * @constructor + * @param {google.cloud.deploy.v1.IRetry=} [properties] Properties to set + */ + function Retry(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]]; + } + + /** + * Retry attempts. + * @member {number|Long} attempts + * @memberof google.cloud.deploy.v1.Retry + * @instance + */ + Retry.prototype.attempts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Retry wait. + * @member {google.protobuf.IDuration|null|undefined} wait + * @memberof google.cloud.deploy.v1.Retry + * @instance + */ + Retry.prototype.wait = null; + + /** + * Retry backoffMode. + * @member {google.cloud.deploy.v1.BackoffMode} backoffMode + * @memberof google.cloud.deploy.v1.Retry + * @instance + */ + Retry.prototype.backoffMode = 0; + + /** + * Creates a new Retry instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Retry + * @static + * @param {google.cloud.deploy.v1.IRetry=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Retry} Retry instance + */ + Retry.create = function create(properties) { + return new Retry(properties); + }; + + /** + * Encodes the specified Retry message. Does not implicitly {@link google.cloud.deploy.v1.Retry.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Retry + * @static + * @param {google.cloud.deploy.v1.IRetry} message Retry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Retry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attempts != null && Object.hasOwnProperty.call(message, "attempts")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.attempts); + if (message.wait != null && Object.hasOwnProperty.call(message, "wait")) + $root.google.protobuf.Duration.encode(message.wait, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.backoffMode != null && Object.hasOwnProperty.call(message, "backoffMode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.backoffMode); + return writer; + }; + + /** + * Encodes the specified Retry message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Retry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Retry + * @static + * @param {google.cloud.deploy.v1.IRetry} message Retry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Retry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Retry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Retry + * @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.Retry} Retry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Retry.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.Retry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.attempts = reader.int64(); + break; + } + case 2: { + message.wait = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.backoffMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Retry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Retry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Retry} Retry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Retry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Retry message. + * @function verify + * @memberof google.cloud.deploy.v1.Retry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Retry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attempts != null && message.hasOwnProperty("attempts")) + if (!$util.isInteger(message.attempts) && !(message.attempts && $util.isInteger(message.attempts.low) && $util.isInteger(message.attempts.high))) + return "attempts: integer|Long expected"; + if (message.wait != null && message.hasOwnProperty("wait")) { + var error = $root.google.protobuf.Duration.verify(message.wait); + if (error) + return "wait." + error; + } + if (message.backoffMode != null && message.hasOwnProperty("backoffMode")) + switch (message.backoffMode) { + default: + return "backoffMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a Retry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Retry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Retry} Retry + */ + Retry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Retry) + return object; + var message = new $root.google.cloud.deploy.v1.Retry(); + if (object.attempts != null) + if ($util.Long) + (message.attempts = $util.Long.fromValue(object.attempts)).unsigned = false; + else if (typeof object.attempts === "string") + message.attempts = parseInt(object.attempts, 10); + else if (typeof object.attempts === "number") + message.attempts = object.attempts; + else if (typeof object.attempts === "object") + message.attempts = new $util.LongBits(object.attempts.low >>> 0, object.attempts.high >>> 0).toNumber(); + if (object.wait != null) { + if (typeof object.wait !== "object") + throw TypeError(".google.cloud.deploy.v1.Retry.wait: object expected"); + message.wait = $root.google.protobuf.Duration.fromObject(object.wait); + } + switch (object.backoffMode) { + default: + if (typeof object.backoffMode === "number") { + message.backoffMode = object.backoffMode; + break; + } + break; + case "BACKOFF_MODE_UNSPECIFIED": + case 0: + message.backoffMode = 0; + break; + case "BACKOFF_MODE_LINEAR": + case 1: + message.backoffMode = 1; + break; + case "BACKOFF_MODE_EXPONENTIAL": + case 2: + message.backoffMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a Retry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Retry + * @static + * @param {google.cloud.deploy.v1.Retry} message Retry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Retry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.attempts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.attempts = options.longs === String ? "0" : 0; + object.wait = null; + object.backoffMode = options.enums === String ? "BACKOFF_MODE_UNSPECIFIED" : 0; + } + if (message.attempts != null && message.hasOwnProperty("attempts")) + if (typeof message.attempts === "number") + object.attempts = options.longs === String ? String(message.attempts) : message.attempts; + else + object.attempts = options.longs === String ? $util.Long.prototype.toString.call(message.attempts) : options.longs === Number ? new $util.LongBits(message.attempts.low >>> 0, message.attempts.high >>> 0).toNumber() : message.attempts; + if (message.wait != null && message.hasOwnProperty("wait")) + object.wait = $root.google.protobuf.Duration.toObject(message.wait, options); + if (message.backoffMode != null && message.hasOwnProperty("backoffMode")) + object.backoffMode = options.enums === String ? $root.google.cloud.deploy.v1.BackoffMode[message.backoffMode] === undefined ? message.backoffMode : $root.google.cloud.deploy.v1.BackoffMode[message.backoffMode] : message.backoffMode; + return object; + }; + + /** + * Converts this Retry to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Retry + * @instance + * @returns {Object.} JSON object + */ + Retry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Retry + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Retry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Retry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Retry"; + }; + + return Retry; + })(); + + v1.Rollback = (function() { + + /** + * Properties of a Rollback. + * @memberof google.cloud.deploy.v1 + * @interface IRollback + * @property {string|null} [destinationPhase] Rollback destinationPhase + * @property {boolean|null} [disableRollbackIfRolloutPending] Rollback disableRollbackIfRolloutPending + */ + + /** + * Constructs a new Rollback. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Rollback. + * @implements IRollback + * @constructor + * @param {google.cloud.deploy.v1.IRollback=} [properties] Properties to set + */ + function Rollback(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]]; + } + + /** + * Rollback destinationPhase. + * @member {string} destinationPhase + * @memberof google.cloud.deploy.v1.Rollback + * @instance + */ + Rollback.prototype.destinationPhase = ""; + + /** + * Rollback disableRollbackIfRolloutPending. + * @member {boolean} disableRollbackIfRolloutPending + * @memberof google.cloud.deploy.v1.Rollback + * @instance + */ + Rollback.prototype.disableRollbackIfRolloutPending = false; + + /** + * Creates a new Rollback instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Rollback + * @static + * @param {google.cloud.deploy.v1.IRollback=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Rollback} Rollback instance + */ + Rollback.create = function create(properties) { + return new Rollback(properties); + }; + + /** + * Encodes the specified Rollback message. Does not implicitly {@link google.cloud.deploy.v1.Rollback.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Rollback + * @static + * @param {google.cloud.deploy.v1.IRollback} message Rollback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollback.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinationPhase != null && Object.hasOwnProperty.call(message, "destinationPhase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationPhase); + if (message.disableRollbackIfRolloutPending != null && Object.hasOwnProperty.call(message, "disableRollbackIfRolloutPending")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableRollbackIfRolloutPending); + return writer; + }; + + /** + * Encodes the specified Rollback message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Rollback.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Rollback + * @static + * @param {google.cloud.deploy.v1.IRollback} message Rollback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollback.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rollback message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Rollback + * @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.Rollback} Rollback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollback.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.Rollback(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.destinationPhase = reader.string(); + break; + } + case 2: { + message.disableRollbackIfRolloutPending = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Rollback message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Rollback + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Rollback} Rollback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollback.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rollback message. + * @function verify + * @memberof google.cloud.deploy.v1.Rollback + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rollback.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.destinationPhase != null && message.hasOwnProperty("destinationPhase")) + if (!$util.isString(message.destinationPhase)) + return "destinationPhase: string expected"; + if (message.disableRollbackIfRolloutPending != null && message.hasOwnProperty("disableRollbackIfRolloutPending")) + if (typeof message.disableRollbackIfRolloutPending !== "boolean") + return "disableRollbackIfRolloutPending: boolean expected"; + return null; + }; + + /** + * Creates a Rollback message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Rollback + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Rollback} Rollback + */ + Rollback.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Rollback) + return object; + var message = new $root.google.cloud.deploy.v1.Rollback(); + if (object.destinationPhase != null) + message.destinationPhase = String(object.destinationPhase); + if (object.disableRollbackIfRolloutPending != null) + message.disableRollbackIfRolloutPending = Boolean(object.disableRollbackIfRolloutPending); + return message; + }; + + /** + * Creates a plain object from a Rollback message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Rollback + * @static + * @param {google.cloud.deploy.v1.Rollback} message Rollback + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rollback.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.destinationPhase = ""; + object.disableRollbackIfRolloutPending = false; + } + if (message.destinationPhase != null && message.hasOwnProperty("destinationPhase")) + object.destinationPhase = message.destinationPhase; + if (message.disableRollbackIfRolloutPending != null && message.hasOwnProperty("disableRollbackIfRolloutPending")) + object.disableRollbackIfRolloutPending = message.disableRollbackIfRolloutPending; + return object; + }; + + /** + * Converts this Rollback to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Rollback + * @instance + * @returns {Object.} JSON object + */ + Rollback.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Rollback + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Rollback + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rollback.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Rollback"; + }; + + return Rollback; + })(); + v1.AutomationRuleCondition = (function() { /** @@ -47772,6 +49265,7 @@ * @memberof google.cloud.deploy.v1 * @interface IRepairRolloutOperation * @property {string|null} [rollout] RepairRolloutOperation rollout + * @property {number|Long|null} [currentRepairPhaseIndex] RepairRolloutOperation currentRepairPhaseIndex * @property {Array.|null} [repairPhases] RepairRolloutOperation repairPhases * @property {string|null} [phaseId] RepairRolloutOperation phaseId * @property {string|null} [jobId] RepairRolloutOperation jobId @@ -47801,6 +49295,14 @@ */ RepairRolloutOperation.prototype.rollout = ""; + /** + * RepairRolloutOperation currentRepairPhaseIndex. + * @member {number|Long} currentRepairPhaseIndex + * @memberof google.cloud.deploy.v1.RepairRolloutOperation + * @instance + */ + RepairRolloutOperation.prototype.currentRepairPhaseIndex = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** * RepairRolloutOperation repairPhases. * @member {Array.} repairPhases @@ -47858,6 +49360,8 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.phaseId); if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.jobId); + if (message.currentRepairPhaseIndex != null && Object.hasOwnProperty.call(message, "currentRepairPhaseIndex")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.currentRepairPhaseIndex); return writer; }; @@ -47896,6 +49400,10 @@ message.rollout = reader.string(); break; } + case 6: { + message.currentRepairPhaseIndex = reader.int64(); + break; + } case 3: { if (!(message.repairPhases && message.repairPhases.length)) message.repairPhases = []; @@ -47948,6 +49456,9 @@ if (message.rollout != null && message.hasOwnProperty("rollout")) if (!$util.isString(message.rollout)) return "rollout: string expected"; + if (message.currentRepairPhaseIndex != null && message.hasOwnProperty("currentRepairPhaseIndex")) + if (!$util.isInteger(message.currentRepairPhaseIndex) && !(message.currentRepairPhaseIndex && $util.isInteger(message.currentRepairPhaseIndex.low) && $util.isInteger(message.currentRepairPhaseIndex.high))) + return "currentRepairPhaseIndex: integer|Long expected"; if (message.repairPhases != null && message.hasOwnProperty("repairPhases")) { if (!Array.isArray(message.repairPhases)) return "repairPhases: array expected"; @@ -47980,6 +49491,15 @@ var message = new $root.google.cloud.deploy.v1.RepairRolloutOperation(); if (object.rollout != null) message.rollout = String(object.rollout); + if (object.currentRepairPhaseIndex != null) + if ($util.Long) + (message.currentRepairPhaseIndex = $util.Long.fromValue(object.currentRepairPhaseIndex)).unsigned = false; + else if (typeof object.currentRepairPhaseIndex === "string") + message.currentRepairPhaseIndex = parseInt(object.currentRepairPhaseIndex, 10); + else if (typeof object.currentRepairPhaseIndex === "number") + message.currentRepairPhaseIndex = object.currentRepairPhaseIndex; + else if (typeof object.currentRepairPhaseIndex === "object") + message.currentRepairPhaseIndex = new $util.LongBits(object.currentRepairPhaseIndex.low >>> 0, object.currentRepairPhaseIndex.high >>> 0).toNumber(); if (object.repairPhases) { if (!Array.isArray(object.repairPhases)) throw TypeError(".google.cloud.deploy.v1.RepairRolloutOperation.repairPhases: array expected"); @@ -48016,6 +49536,11 @@ object.rollout = ""; object.phaseId = ""; object.jobId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.currentRepairPhaseIndex = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.currentRepairPhaseIndex = options.longs === String ? "0" : 0; } if (message.rollout != null && message.hasOwnProperty("rollout")) object.rollout = message.rollout; @@ -48028,6 +49553,11 @@ object.phaseId = message.phaseId; if (message.jobId != null && message.hasOwnProperty("jobId")) object.jobId = message.jobId; + if (message.currentRepairPhaseIndex != null && message.hasOwnProperty("currentRepairPhaseIndex")) + if (typeof message.currentRepairPhaseIndex === "number") + object.currentRepairPhaseIndex = options.longs === String ? String(message.currentRepairPhaseIndex) : message.currentRepairPhaseIndex; + else + object.currentRepairPhaseIndex = options.longs === String ? $util.Long.prototype.toString.call(message.currentRepairPhaseIndex) : options.longs === Number ? new $util.LongBits(message.currentRepairPhaseIndex.low >>> 0, message.currentRepairPhaseIndex.high >>> 0).toNumber() : message.currentRepairPhaseIndex; return object; }; @@ -48978,6 +50508,7 @@ * @property {string|null} [rolloutId] RollbackAttempt rolloutId * @property {google.cloud.deploy.v1.RepairState|null} [state] RollbackAttempt state * @property {string|null} [stateDesc] RollbackAttempt stateDesc + * @property {boolean|null} [disableRollbackIfRolloutPending] RollbackAttempt disableRollbackIfRolloutPending */ /** @@ -49027,6 +50558,14 @@ */ RollbackAttempt.prototype.stateDesc = ""; + /** + * RollbackAttempt disableRollbackIfRolloutPending. + * @member {boolean} disableRollbackIfRolloutPending + * @memberof google.cloud.deploy.v1.RollbackAttempt + * @instance + */ + RollbackAttempt.prototype.disableRollbackIfRolloutPending = false; + /** * Creates a new RollbackAttempt instance using the specified properties. * @function create @@ -49059,6 +50598,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); if (message.stateDesc != null && Object.hasOwnProperty.call(message, "stateDesc")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.stateDesc); + if (message.disableRollbackIfRolloutPending != null && Object.hasOwnProperty.call(message, "disableRollbackIfRolloutPending")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disableRollbackIfRolloutPending); return writer; }; @@ -49109,6 +50650,10 @@ message.stateDesc = reader.string(); break; } + case 5: { + message.disableRollbackIfRolloutPending = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -49166,6 +50711,9 @@ if (message.stateDesc != null && message.hasOwnProperty("stateDesc")) if (!$util.isString(message.stateDesc)) return "stateDesc: string expected"; + if (message.disableRollbackIfRolloutPending != null && message.hasOwnProperty("disableRollbackIfRolloutPending")) + if (typeof message.disableRollbackIfRolloutPending !== "boolean") + return "disableRollbackIfRolloutPending: boolean expected"; return null; }; @@ -49223,6 +50771,8 @@ } if (object.stateDesc != null) message.stateDesc = String(object.stateDesc); + if (object.disableRollbackIfRolloutPending != null) + message.disableRollbackIfRolloutPending = Boolean(object.disableRollbackIfRolloutPending); return message; }; @@ -49244,6 +50794,7 @@ object.rolloutId = ""; object.state = options.enums === String ? "REPAIR_STATE_UNSPECIFIED" : 0; object.stateDesc = ""; + object.disableRollbackIfRolloutPending = false; } if (message.destinationPhase != null && message.hasOwnProperty("destinationPhase")) object.destinationPhase = message.destinationPhase; @@ -49253,6 +50804,8 @@ object.state = options.enums === String ? $root.google.cloud.deploy.v1.RepairState[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.RepairState[message.state] : message.state; if (message.stateDesc != null && message.hasOwnProperty("stateDesc")) object.stateDesc = message.stateDesc; + if (message.disableRollbackIfRolloutPending != null && message.hasOwnProperty("disableRollbackIfRolloutPending")) + object.disableRollbackIfRolloutPending = message.disableRollbackIfRolloutPending; return object; }; diff --git a/packages/google-cloud-deploy/protos/protos.json b/packages/google-cloud-deploy/protos/protos.json index c9a3da937f3..dbd9cfab5e4 100644 --- a/packages/google-cloud-deploy/protos/protos.json +++ b/packages/google-cloud-deploy/protos/protos.json @@ -1459,6 +1459,34 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "routeDestinations": { + "type": "RouteDestinations", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RouteDestinations": { + "fields": { + "destinationIds": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "propagateService": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } } } }, @@ -1998,6 +2026,14 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "associatedEntities": { + "keyType": "string", + "type": "AssociatedEntities", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "etag": { "type": "string", "id": 12, @@ -2220,6 +2256,26 @@ } } }, + "AssociatedEntities": { + "fields": { + "gkeClusters": { + "rule": "repeated", + "type": "GkeCluster", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "anthosClusters": { + "rule": "repeated", + "type": "AnthosCluster", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "ListTargetsRequest": { "fields": { "parent": { @@ -3948,6 +4004,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "activeRepairAutomationRun": { + "type": "string", + "id": 28, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -5450,6 +5513,14 @@ "(google.api.field_behavior)": "REQUIRED" } }, + "phases": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "jobs": { "rule": "repeated", "type": "string", @@ -5464,6 +5535,83 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "repairPhases": { + "rule": "repeated", + "type": "RepairPhaseConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RepairPhaseConfig": { + "oneofs": { + "repairPhase": { + "oneof": [ + "retry", + "rollback" + ] + } + }, + "fields": { + "retry": { + "type": "Retry", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rollback": { + "type": "Rollback", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Retry": { + "fields": { + "attempts": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "wait": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backoffMode": { + "type": "BackoffMode", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Rollback": { + "fields": { + "destinationPhase": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableRollbackIfRolloutPending": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -5877,6 +6025,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "currentRepairPhaseIndex": { + "type": "int64", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "repairPhases": { "rule": "repeated", "type": "RepairPhase", @@ -6014,6 +6169,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "disableRollbackIfRolloutPending": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } },