All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cloudfoundry.multiapps.controller.process.variables.Variables Maven / Gradle / Ivy

There is a newer version: 1.183.0
Show newest version
package org.cloudfoundry.multiapps.controller.process.variables;

import java.time.Duration;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

import org.cloudfoundry.multiapps.controller.client.lib.domain.CloudApplicationExtended;
import org.cloudfoundry.multiapps.controller.client.lib.domain.CloudServiceInstanceExtended;
import org.cloudfoundry.multiapps.controller.core.cf.DeploymentMode;
import org.cloudfoundry.multiapps.controller.core.cf.apps.ApplicationStateAction;
import org.cloudfoundry.multiapps.controller.core.helpers.MtaArchiveElements;
import org.cloudfoundry.multiapps.controller.core.model.ApplicationColor;
import org.cloudfoundry.multiapps.controller.core.model.DeployedMta;
import org.cloudfoundry.multiapps.controller.core.model.DeployedMtaServiceKey;
import org.cloudfoundry.multiapps.controller.core.model.DynamicResolvableParameter;
import org.cloudfoundry.multiapps.controller.core.model.ErrorType;
import org.cloudfoundry.multiapps.controller.core.model.IncrementalAppInstanceUpdateConfiguration;
import org.cloudfoundry.multiapps.controller.core.model.Phase;
import org.cloudfoundry.multiapps.controller.core.model.SubprocessPhase;
import org.cloudfoundry.multiapps.controller.persistence.model.ConfigurationEntry;
import org.cloudfoundry.multiapps.controller.persistence.model.ConfigurationSubscription;
import org.cloudfoundry.multiapps.controller.persistence.model.FileEntry;
import org.cloudfoundry.multiapps.controller.process.DeployStrategy;
import org.cloudfoundry.multiapps.controller.process.steps.StepPhase;
import org.cloudfoundry.multiapps.controller.process.util.ArchiveEntryWithStreamPositions;
import org.cloudfoundry.multiapps.controller.process.util.ServiceAction;
import org.cloudfoundry.multiapps.controller.process.util.ServiceDeletionActions;
import org.cloudfoundry.multiapps.mta.model.DeploymentDescriptor;
import org.cloudfoundry.multiapps.mta.model.ExtensionDescriptor;
import org.cloudfoundry.multiapps.mta.model.Hook;
import org.cloudfoundry.multiapps.mta.model.Module;
import org.cloudfoundry.multiapps.mta.model.VersionRule;

import com.fasterxml.jackson.core.type.TypeReference;
import com.sap.cloudfoundry.client.facade.domain.CloudApplication;
import com.sap.cloudfoundry.client.facade.domain.CloudPackage;
import com.sap.cloudfoundry.client.facade.domain.CloudRoute;
import com.sap.cloudfoundry.client.facade.domain.CloudServiceBinding;
import com.sap.cloudfoundry.client.facade.domain.CloudServiceBroker;
import com.sap.cloudfoundry.client.facade.domain.CloudServiceKey;
import com.sap.cloudfoundry.client.facade.domain.CloudTask;
import com.sap.cloudfoundry.client.facade.domain.ServiceOperation;

public interface Variables {

    Variable CORRELATION_ID = ImmutableSimpleVariable. builder()
                                                             .name("correlationId")
                                                             .build();
    Variable ORGANIZATION_NAME = ImmutableSimpleVariable. builder()
                                                                .name("org")
                                                                .build();
    Variable ORGANIZATION_GUID = ImmutableSimpleVariable. builder()
                                                                .name("orgId")
                                                                .build();
    Variable SPACE_NAME = ImmutableSimpleVariable. builder()
                                                         .name("space")
                                                         .build();
    Variable SPACE_GUID = ImmutableSimpleVariable. builder()
                                                         .name(org.cloudfoundry.multiapps.controller.persistence.Constants.VARIABLE_NAME_SPACE_ID)
                                                         .build();
    Variable SUBPROCESS_ID = ImmutableSimpleVariable. builder()
                                                            .name("subProcessId")
                                                            .build();
    Variable SERVICE_ID = ImmutableSimpleVariable. builder()
                                                         .name(org.cloudfoundry.multiapps.controller.persistence.Constants.VARIABLE_NAME_SERVICE_ID)
                                                         .build();
    Variable TASK_ID = ImmutableSimpleVariable. builder()
                                                      .name("__TASK_ID")
                                                      .build();
    Variable TIMESTAMP = ImmutableSimpleVariable. builder()
                                                        .name("timestamp")
                                                        .build();
    Variable SERVICE_TO_PROCESS_NAME = ImmutableSimpleVariable. builder()
                                                                      .name("serviceToProcessName")
                                                                      .build();
    Variable APP_ARCHIVE_ID = ImmutableSimpleVariable. builder()
                                                             .name("appArchiveId")
                                                             .build();
    Variable EXT_DESCRIPTOR_FILE_ID = ImmutableSimpleVariable. builder()
                                                                     .name("mtaExtDescriptorId")
                                                                     .build();
    Variable MTA_ID = ImmutableSimpleVariable. builder()
                                                     .name("mtaId")
                                                     .build();
    Variable MTA_NAMESPACE = ImmutableSimpleVariable. builder()
                                                            .name("namespace")
                                                            .build();
    Variable APPLY_NAMESPACE_APP_NAMES = ImmutableSimpleVariable. builder()
                                                                         .name("applyNamespaceAppNames")
                                                                         .defaultValue(null)
                                                                         .build();

    Variable APPLY_NAMESPACE_SERVICE_NAMES = ImmutableSimpleVariable. builder()
                                                                             .name("applyNamespaceServiceNames")
                                                                             .defaultValue(null)
                                                                             .build();

    Variable APPLY_NAMESPACE_APP_ROUTES = ImmutableSimpleVariable. builder()
                                                                          .name("applyNamespaceAppRoutes")
                                                                          .defaultValue(null)
                                                                          .build();

    Variable APPLY_NAMESPACE_AS_SUFFIX = ImmutableSimpleVariable. builder()
                                                                         .name("applyNamespaceAsSuffix")
                                                                         .defaultValue(null)
                                                                         .build();

    Variable CTS_PROCESS_ID = ImmutableSimpleVariable. builder()
                                                             .name("ctsProcessId")
                                                             .build();
    Variable DEPLOY_URI = ImmutableSimpleVariable. builder()
                                                         .name("deployUri")
                                                         .build();
    Variable CTS_USERNAME = ImmutableSimpleVariable. builder()
                                                           .name("userId")
                                                           .build();
    Variable CTS_PASSWORD = ImmutableSimpleVariable. builder()
                                                           .name("password")
                                                           .build();
    Variable TRANSFER_TYPE = ImmutableSimpleVariable. builder()
                                                            .name("transferType")
                                                            .build();
    Variable APPLICATION_TYPE = ImmutableSimpleVariable. builder()
                                                               .name("applType")
                                                               .build();
    Variable USER = ImmutableSimpleVariable. builder()
                                                   .name("user")
                                                   .build();
    Variable SERVICE_OFFERING = ImmutableSimpleVariable. builder()
                                                               .name("serviceOffering")
                                                               .build();
    Variable INDEX_VARIABLE_NAME = ImmutableSimpleVariable. builder()
                                                                  .name("indexVariableName")
                                                                  .build();
    Variable STEP_EXECUTION = ImmutableSimpleVariable. builder()
                                                             .name("StepExecution")
                                                             .build();
    Variable APP_CONTENT_CHANGED = ImmutableSimpleVariable. builder()
                                                                   .name("appContentChanged")
                                                                   .defaultValue(false)
                                                                   .build();
    Variable START_APPS = ImmutableSimpleVariable. builder()
                                                          .name("startApps")
                                                          .defaultValue(true)
                                                          .build();

    Variable MTA_MAJOR_SCHEMA_VERSION = ImmutableSimpleVariable. builder()
                                                                        .name("mtaMajorSchemaVersion")
                                                                        .build();

    Variable APPS_START_TIMEOUT_PROCESS_VARIABLE = ImmutableSimpleVariable. builder()
                                                                                    .name("startTimeout")
                                                                                    .defaultValue(Duration.ofHours(1))
                                                                                    .build();
    Variable APPS_STAGE_TIMEOUT_PROCESS_VARIABLE = ImmutableSimpleVariable. builder()
                                                                                    .name("appsStageTimeout")
                                                                                    .defaultValue(Duration.ofHours(1))
                                                                                    .build();

    Variable APPS_TASK_EXECUTION_TIMEOUT_PROCESS_VARIABLE = ImmutableSimpleVariable. builder()
                                                                                             .name("appsTaskExecutionTimeout")
                                                                                             .defaultValue(Duration.ofHours(12))
                                                                                             .build();
    Variable APPS_UPLOAD_TIMEOUT_PROCESS_VARIABLE = ImmutableSimpleVariable. builder()
                                                                                     .name("appsUploadTimeout")
                                                                                     .defaultValue(Duration.ofHours(1))
                                                                                     .build();
    Variable UPDATED_SERVICE_BROKER_SUBSCRIBERS_COUNT = ImmutableSimpleVariable. builder()
                                                                                        .name("updatedServiceBrokerSubscribersCount")
                                                                                        .build();
    Variable UPDATED_SERVICE_BROKER_SUBSCRIBERS_INDEX = ImmutableSimpleVariable. builder()
                                                                                        .name("updatedServiceBrokerSubscribersIndex")
                                                                                        .build();
    Variable MODULES_COUNT = ImmutableSimpleVariable. builder()
                                                             .name("modulesCount")
                                                             .build();
    Variable MODULES_INDEX = ImmutableSimpleVariable. builder()
                                                             .name("modulesIndex")
                                                             .build();
    Variable MTARS_COUNT = ImmutableSimpleVariable. builder()
                                                           .name("mtarsCount")
                                                           .build();
    Variable MTARS_INDEX = ImmutableSimpleVariable. builder()
                                                           .name("mtarsIndex")
                                                           .build();
    Variable TASKS_COUNT = ImmutableSimpleVariable. builder()
                                                           .name("tasksCount")
                                                           .build();
    Variable TASKS_INDEX = ImmutableSimpleVariable. builder()
                                                           .name("tasksIndex")
                                                           .build();
    Variable SERVICES_TO_CREATE_COUNT = ImmutableSimpleVariable. builder()
                                                                        .name("servicesToCreateCount")
                                                                        .build();
    Variable ASYNC_STEP_EXECUTION_INDEX = ImmutableSimpleVariable. builder()
                                                                          .name("asyncStepExecutionIndex")
                                                                          .build();
    Variable START_TIME = ImmutableSimpleVariable. builder()
                                                       .name("startTime")
                                                       .build();
    Variable SKIP_MANAGE_SERVICE_BROKER = ImmutableSimpleVariable. builder()
                                                                          .name("skipManageServiceBroker")
                                                                          .build();
    Variable DELETE_IDLE_URIS = ImmutableSimpleVariable. builder()
                                                                .name("deleteIdleUris")
                                                                .defaultValue(false)
                                                                .build();
    Variable USE_IDLE_URIS = ImmutableSimpleVariable. builder()
                                                             .name("useIdleUris")
                                                             .defaultValue(false)
                                                             .build();
    Variable IS_SERVICE_UPDATED = ImmutableSimpleVariable. builder()
                                                                  .name("isServiceUpdated")
                                                                  .defaultValue(false)
                                                                  .build();
    Variable SKIP_UPDATE_CONFIGURATION_ENTRIES = ImmutableSimpleVariable. builder()
                                                                                 .name("skipUpdateConfigurationEntries")
                                                                                 .defaultValue(false)
                                                                                 .build();
    Variable USER_PROPERTIES_CHANGED = ImmutableSimpleVariable. builder()
                                                                       .name("vcapUserPropertiesChanged")
                                                                       .defaultValue(false)
                                                                       .build();
    Variable APP_NEEDS_RESTAGE = ImmutableSimpleVariable. builder()
                                                                 .name("appNeedsRestage")
                                                                 .defaultValue(false)
                                                                 .build();
    Variable VCAP_APP_PROPERTIES_CHANGED = ImmutableSimpleVariable. builder()
                                                                           .name("vcapAppPropertiesChanged")
                                                                           .defaultValue(false)
                                                                           .build();
    Variable VCAP_SERVICES_PROPERTIES_CHANGED = ImmutableSimpleVariable. builder()
                                                                                .name("vcapServicesPropertiesChanged")
                                                                                .defaultValue(false)
                                                                                .build();
    Variable SHOULD_SKIP_SERVICE_REBINDING = ImmutableSimpleVariable. builder()
                                                                             .name("shouldSkipServiceRebinding")
                                                                             .defaultValue(false)
                                                                             .build();
    Variable DELETE_SERVICES = ImmutableSimpleVariable. builder()
                                                               .name("deleteServices")
                                                               .defaultValue(false)
                                                               .build();
    Variable DELETE_SERVICE_KEYS = ImmutableSimpleVariable. builder()
                                                                   .name("deleteServiceKeys")
                                                                   .defaultValue(false)
                                                                   .build();
    Variable DELETE_SERVICE_BROKERS = ImmutableSimpleVariable. builder()
                                                                      .name("deleteServiceBrokers")
                                                                      .defaultValue(false)
                                                                      .build();
    Variable NO_START = ImmutableSimpleVariable. builder()
                                                        .name("noStart")
                                                        .defaultValue(false)
                                                        .build();
    Variable KEEP_FILES = ImmutableSimpleVariable. builder()
                                                          .name("keepFiles")
                                                          .defaultValue(false)
                                                          .build();
    Variable NO_CONFIRM = ImmutableSimpleVariable. builder()
                                                          .name("noConfirm")
                                                          .defaultValue(false)
                                                          .build();
    Variable NO_RESTART_SUBSCRIBED_APPS = ImmutableSimpleVariable. builder()
                                                                          .name("noRestartSubscribedApps")
                                                                          .defaultValue(false)
                                                                          .build();
    Variable NO_FAIL_ON_MISSING_PERMISSIONS = ImmutableSimpleVariable. builder()
                                                                              .name("noFailOnMissingPermissions")
                                                                              .defaultValue(false)
                                                                              .build();
    Variable ABORT_ON_ERROR = ImmutableSimpleVariable. builder()
                                                              .name("abortOnError")
                                                              .defaultValue(false)
                                                              .build();
    Variable KEEP_ORIGINAL_APP_NAMES_AFTER_DEPLOY = ImmutableSimpleVariable. builder()
                                                                                    .name("keepOriginalAppNamesAfterDeploy")
                                                                                    .defaultValue(false)
                                                                                    .build();
    Variable SKIP_IDLE_START = ImmutableSimpleVariable. builder()
                                                               .name("skipIdleStart")
                                                               .defaultValue(false)
                                                               .build();
    Variable EXECUTE_ONE_OFF_TASKS = ImmutableSimpleVariable. builder()
                                                                     .name("executeOneOffTasks")
                                                                     .build();
    Variable SHOULD_UPLOAD_APPLICATION_CONTENT = ImmutableSimpleVariable. builder()
                                                                                 .name("shouldUploadApplicationContent")
                                                                                 .build();
    Variable REBUILD_APP_ENV = ImmutableSimpleVariable. builder()
                                                               .name("rebuildAppEnv")
                                                               .build();
    Variable BUILD_GUID = ImmutableSimpleVariable. builder()
                                                       .name("buildGuid")
                                                       .build();
    Variable DEPLOYMENT_DESCRIPTOR = ImmutableJsonStringVariable. builder()
                                                                                      .name("mtaDeploymentDescriptor")
                                                                                      .type(Variable.typeReference(DeploymentDescriptor.class))
                                                                                      .build();
    Variable DEPLOYMENT_DESCRIPTOR_WITH_SYSTEM_PARAMETERS = ImmutableJsonStringVariable. builder()
                                                                                                             .name("mtaDeploymentDescriptorWithSystemParameters")
                                                                                                             .type(Variable.typeReference(DeploymentDescriptor.class))
                                                                                                             .build();
    Variable COMPLETE_DEPLOYMENT_DESCRIPTOR = ImmutableJsonStringVariable. builder()
                                                                                               .name("completeMtaDeploymentDescriptor")
                                                                                               .type(Variable.typeReference(DeploymentDescriptor.class))
                                                                                               .build();
    Variable APP_TO_PROCESS = ImmutableJsonStringVariable. builder()
                                                                                   .name("appToProcess")
                                                                                   .type(Variable.typeReference(CloudApplicationExtended.class))
                                                                                   .build();
    Variable BINDING_NAME = ImmutableSimpleVariable. builder()
                                                           .name("bindingName")
                                                           .defaultValue(null)
                                                           .build();

    Variable MTA_ARCHIVE_ELEMENTS = ImmutableJsonStringVariable. builder()
                                                                                   .name("mtaArchiveElements")
                                                                                   .type(Variable.typeReference(MtaArchiveElements.class))
                                                                                   .defaultValue(new MtaArchiveElements())
                                                                                   .build();
    Variable SERVICE_TO_PROCESS = ImmutableJsonStringVariable. builder()
                                                                                           .name("serviceToProcess")
                                                                                           .type(Variable.typeReference(CloudServiceInstanceExtended.class))
                                                                                           .build();
    Variable CLOUD_PACKAGE = ImmutableJsonStringVariable. builder()
                                                                      .name("uploadedCloudPackage")
                                                                      .type(Variable.typeReference(CloudPackage.class))
                                                                      .build();
    Variable HOOK_FOR_EXECUTION = ImmutableJsonStringVariable. builder()
                                                                   .name("hookForExecution")
                                                                   .type(Variable.typeReference(Hook.class))
                                                                   .build();
    Variable> APPS_TO_DEPLOY = ImmutableJsonBinaryVariable.> builder()
                                                                       .name("appsToDeploy")
                                                                       .type(new TypeReference<>() {
                                                                       })
                                                                       .build();
    Variable> APPS_TO_RENAME = ImmutableJsonBinaryVariable.> builder()
                                                                       .name("appsToRename")
                                                                       .type(new TypeReference<>() {
                                                                       })
                                                                       .build();
    Variable> CONFIGURATION_ENTRIES_TO_PUBLISH = ImmutableJsonBinaryVariable.> builder()
                                                                                                     .name("configurationEntriesToPublish")
                                                                                                     .type(new TypeReference<>() {
                                                                                                     })
                                                                                                     .build();
    Variable> DELETED_ENTRIES = ImmutableJsonBinaryVariable.> builder()
                                                                                    .name("deletedEntries")
                                                                                    .type(new TypeReference<>() {
                                                                                    })
                                                                                    .defaultValue(Collections.emptyList())
                                                                                    .build();
    Variable> PUBLISHED_ENTRIES = ImmutableJsonBinaryVariable.> builder()
                                                                                      .name("publishedEntries")
                                                                                      .type(new TypeReference<>() {
                                                                                      })
                                                                                      .build();
    Variable CREATED_OR_UPDATED_SERVICE_BROKER = ImmutableJsonBinaryVariable. builder()
                                                                                                .name("createdOrUpdatedServiceBroker")
                                                                                                .type(Variable.typeReference(CloudServiceBroker.class))
                                                                                                .build();
    Variable> CUSTOM_DOMAINS = ImmutableJsonBinaryVariable.> builder()
                                                                       .name("customDomains")
                                                                       .type(new TypeReference<>() {
                                                                       })
                                                                       .build();
    Variable DEPLOYED_MTA = ImmutableJsonBinaryVariable. builder()
                                                                    .name("deployedMta")
                                                                    .type(Variable.typeReference(DeployedMta.class))
                                                                    .build();
    Variable> DEPLOYED_MTA_SERVICE_KEYS = ImmutableJsonBinaryVariable.> builder()
                                                                                                 .name("deployedMtaServiceKeys")
                                                                                                 .type(new TypeReference<>() {
                                                                                                 })
                                                                                                 .defaultValue(Collections.emptyList())
                                                                                                 .build();
    Variable EXISTING_APP = ImmutableJsonBinaryVariable. builder()
                                                                         .name("existingApp")
                                                                         .type(Variable.typeReference(CloudApplication.class))
                                                                         .build();
    Variable MODULE_TO_DEPLOY = ImmutableJsonBinaryVariable. builder()
                                                                   .name("moduleToDeploy")
                                                                   .type(Variable.typeReference(Module.class))
                                                                   .build();
    Variable> MTA_ARCHIVE_MODULES = ImmutableJsonBinaryVariable.> builder()
                                                                           .name("mtaArchiveModules")
                                                                           .type(new TypeReference<>() {
                                                                           })
                                                                           .build();
    Variable> MTA_MODULES = ImmutableJsonBinaryVariable.> builder()
                                                                   .name("mtaModules")
                                                                   .type(new TypeReference<>() {
                                                                   })
                                                                   .build();
    Variable>> SERVICE_KEYS_TO_CREATE = ImmutableJsonBinaryVariable.>> builder()
                                                                                                     .name("serviceKeysToCreate")
                                                                                                     .type(new TypeReference<>() {
                                                                                                     })
                                                                                                     .build();

    Variable> SERVICE_KEYS_TO_DELETE = ImmutableJsonStringListVariable. builder()
                                                                                                  .name("serviceKeysToDelete")
                                                                                                  .type(new TypeReference<>() {
                                                                                                  })
                                                                                                  .defaultValue(Collections.emptyList())
                                                                                                  .build();

    Variable>> SERVICE_KEYS_FOR_CONTENT_DEPLOY = ImmutableJsonBinaryVariable.>> builder()
                                                                                                              .name("serviceKeysForContentDeploy")
                                                                                                              .type(new TypeReference<>() {
                                                                                                              })
                                                                                                              .build();
    Variable SERVICE_TO_DELETE = ImmutableSimpleVariable. builder()
                                                                .name("serviceToDelete")
                                                                .build();
    Variable> SERVICES_TO_DELETE = ImmutableSimpleVariable.> builder()
                                                                       .name("servicesToDelete")
                                                                       .build();
    Variable> SERVICES_TO_POLL = ImmutableJsonBinaryVariable.> builder()
                                                                                               .name("servicesToPoll")
                                                                                               .type(new TypeReference<>() {
                                                                                               })
                                                                                               .build();
    Variable STARTED_TASK = ImmutableJsonBinaryVariable. builder()
                                                                  .name("startedTask")
                                                                  .type(Variable.typeReference(CloudTask.class))
                                                                  .build();
    Variable> SUBSCRIPTIONS_TO_CREATE = ImmutableJsonBinaryVariable.> builder()
                                                                                                   .name("subscriptionsToCreate")
                                                                                                   .type(new TypeReference<>() {
                                                                                                   })
                                                                                                   .build();
    Variable> SUBSCRIPTIONS_TO_DELETE = ImmutableJsonBinaryVariable.> builder()
                                                                                                   .name("subscriptionsToDelete")
                                                                                                   .type(new TypeReference<>() {
                                                                                                   })
                                                                                                   .build();
    Variable> TASKS_TO_EXECUTE = ImmutableJsonBinaryVariable.> builder()
                                                                            .name("tasksToExecute")
                                                                            .type(new TypeReference<>() {
                                                                            })
                                                                            .build();
    Variable> TRIGGERED_SERVICE_OPERATIONS = ImmutableJsonBinaryVariable.> builder()
                                                                                                           .name("triggeredServiceOperations")
                                                                                                           .type(new TypeReference<>() {
                                                                                                           })
                                                                                                           .build();
    Variable> UPDATED_SERVICE_BROKER_SUBSCRIBERS = ImmutableJsonBinaryVariable.> builder()
                                                                                                     .name("updatedServiceBrokerSubscribers")
                                                                                                     .type(new TypeReference<>() {
                                                                                                     })
                                                                                                     .build();
    Variable> UPDATED_SUBSCRIBERS = ImmutableJsonBinaryVariable.> builder()
                                                                                      .name("updatedSubscribers")
                                                                                      .type(new TypeReference<>() {
                                                                                      })
                                                                                      .build();
    Variable> CURRENT_ROUTES = ImmutableJsonBinaryListVariable. builder()
                                                                               .name("currentRoutes")
                                                                               .type(Variable.typeReference(CloudRoute.class))
                                                                               .defaultValue(Collections.emptyList())
                                                                               .build();
    Variable> SERVICES_DATA = ImmutableJsonBinaryVariable.> builder()
                                                                                            .name("servicesData")
                                                                                            .type(new TypeReference<>() {
                                                                                            })
                                                                                            .defaultValue(Collections.emptyList())
                                                                                            .build();
    Variable>>> FILE_LIST = ImmutableSimpleVariable.>>> builder()
                                                                                        .name("fileList")
                                                                                        .defaultValue(Collections.emptyList())
                                                                                        .build();
    Variable ERROR_TYPE = ImmutableEnumVariable. builder()
                                                          .name("errorType")
                                                          .type(ErrorType.class)
                                                          .build();
    Variable IDLE_MTA_COLOR = ImmutableEnumVariable. builder()
                                                                     .name("idleMtaColor")
                                                                     .type(ApplicationColor.class)
                                                                     .build();
    Variable LIVE_MTA_COLOR = ImmutableEnumVariable. builder()
                                                                     .name("liveMtaColor")
                                                                     .type(ApplicationColor.class)
                                                                     .build();
    Variable STEP_PHASE = ImmutableEnumVariable. builder()
                                                          .name("stepPhase")
                                                          .type(StepPhase.class)
                                                          .defaultValue(StepPhase.EXECUTE)
                                                          .build();
    Variable PHASE = ImmutableEnumVariable. builder()
                                                 .name("phase")
                                                 .type(Phase.class)
                                                 .build();
    Variable SUBPROCESS_PHASE = ImmutableEnumVariable. builder()
                                                                      .name("subprocessPhase")
                                                                      .type(SubprocessPhase.class)
                                                                      .build();
    Variable VERSION_RULE = ImmutableEnumVariable. builder()
                                                              .name("versionRule")
                                                              .type(VersionRule.class)
                                                              .defaultValue(VersionRule.SAME_HIGHER)
                                                              .build();
    Variable DEPLOYMENT_MODE = ImmutableEnumVariable. builder()
                                                                    .name("deploymentMode")
                                                                    .type(DeploymentMode.class)
                                                                    .build();
    Variable> APP_STATE_ACTIONS_TO_EXECUTE = ImmutableEnumListVariable. builder()
                                                                                                   .name("appStateActionsToExecute")
                                                                                                   .type(ApplicationStateAction.class)
                                                                                                   .build();
    Variable> SERVICE_ACTIONS_TO_EXCECUTE = ImmutableEnumListVariable. builder()
                                                                                         .name("serviceActionsToExecute")
                                                                                         .type(ServiceAction.class)
                                                                                         .defaultValue(Collections.emptyList())
                                                                                         .build();
    Variable> APPS_TO_UNDEPLOY = ImmutableJsonStringListVariable. builder()
                                                                                       .name("appsToUndeploy")
                                                                                       .type(Variable.typeReference(CloudApplication.class))
                                                                                       .defaultValue(Collections.emptyList())
                                                                                       .build();
    Variable> SERVICES_TO_BIND = ImmutableJsonStringListVariable. builder()
                                                                                                   .name("servicesToBind")
                                                                                                   .type(Variable.typeReference(CloudServiceInstanceExtended.class))
                                                                                                   .defaultValue(Collections.emptyList())
                                                                                                   .build();
    Variable> SERVICES_TO_CREATE = ImmutableJsonStringListVariable. builder()
                                                                                                     .name("servicesToCreate")
                                                                                                     .type(Variable.typeReference(CloudServiceInstanceExtended.class))
                                                                                                     .defaultValue(Collections.emptyList())
                                                                                                     .build();
    Variable> HOOKS_FOR_EXECUTION = ImmutableJsonStringListVariable. builder()
                                                                              .name("hooksForExecution")
                                                                              .type(Variable.typeReference(Hook.class))
                                                                              .defaultValue(Collections.emptyList())
                                                                              .build();
    Variable> MODULES_TO_DEPLOY = ImmutableJsonBinaryListVariable. builder()
                                                                              .name("modulesToDeploy")
                                                                              .type(Variable.typeReference(Module.class))
                                                                              .defaultValue(Collections.emptyList())
                                                                              .build();
    Variable> ALL_MODULES_TO_DEPLOY = ImmutableJsonBinaryListVariable. builder()
                                                                                  .name("allModulesToDeploy")
                                                                                  .type(Variable.typeReference(Module.class))
                                                                                  .defaultValue(Collections.emptyList())
                                                                                  .build();
    Variable> ITERATED_MODULES_IN_PARALLEL = ImmutableJsonBinaryListVariable. builder()
                                                                                         .name("iteratedModulesInParallel")
                                                                                         .type(Variable.typeReference(Module.class))
                                                                                         .defaultValue(Collections.emptyList())
                                                                                         .build();
    Variable> MODULES_TO_ITERATE_IN_PARALLEL = ImmutableJsonBinaryListVariable. builder()
                                                                                           .name("modulesToIterateInParallel")
                                                                                           .type(Variable.typeReference(Module.class))
                                                                                           .defaultValue(Collections.emptyList())
                                                                                           .build();
    Variable> FILE_ENTRIES = ImmutableJsonBinaryListVariable. builder()
                                                                            .name("fileEntries")
                                                                            .type(Variable.typeReference(FileEntry.class))
                                                                            .defaultValue(Collections.emptyList())
                                                                            .build();
    Variable> MTA_EXTENSION_DESCRIPTOR_CHAIN = ImmutableJsonBinaryListVariableAllowingNulls. builder()
                                                                                                                     .name("mtaExtensionDescriptorChain")
                                                                                                                     .type(Variable.typeReference(ExtensionDescriptor.class))
                                                                                                                     .build();
    Variable> MODULES_FOR_DEPLOYMENT = ImmutableCommaSeparatedValuesVariable.builder()
                                                                                         .name("modulesForDeployment")
                                                                                         .build();
    Variable> RESOURCES_FOR_DEPLOYMENT = ImmutableCommaSeparatedValuesVariable.builder()
                                                                                           .name("resourcesForDeployment")
                                                                                           .build();
    Variable DEPLOY_STRATEGY = ImmutableSimpleVariable. builder()
                                                                      .name("strategy")
                                                                      .defaultValue(DeployStrategy.DEFAULT)
                                                                      .build();
    Variable MISSING_DEFAULT_DOMAIN = ImmutableSimpleVariable. builder()
                                                                      .name("missingDefaultDomain")
                                                                      .defaultValue(false)
                                                                      .build();
    Variable> SERVICES_TO_UNBIND_BIND = ImmutableSimpleVariable.> builder()
                                                                            .name("servicesToUnbindBind")
                                                                            .defaultValue(Collections.emptyList())
                                                                            .build();
    Variable SERVICE_TO_UNBIND_BIND = ImmutableSimpleVariable. builder()
                                                                     .name("serviceToUnbindBind")
                                                                     .build();
    Variable SHOULD_UNBIND_SERVICE_FROM_APP = ImmutableSimpleVariable. builder()
                                                                              .name("shouldUnbindServiceFromApp")
                                                                              .defaultValue(false)
                                                                              .build();
    Variable SHOULD_BIND_SERVICE_TO_APP = ImmutableSimpleVariable. builder()
                                                                          .name("shouldBindServiceToApp")
                                                                          .defaultValue(false)
                                                                          .build();
    Variable> SERVICE_BINDING_PARAMETERS = ImmutableJsonBinaryVariable.> builder()
                                                                                          .name("serviceBindingParameters")
                                                                                          .type(new TypeReference>() {
                                                                                          })
                                                                                          .build();
    Variable SHOULD_UNBIND_BIND_SERVICES_IN_PARALLEL = ImmutableSimpleVariable. builder()
                                                                                       .name("shouldUnbindBindServicesInParallel")
                                                                                       .defaultValue(true)
                                                                                       .build();

    Variable SERVICE_BROKER_ASYNC_JOB_ID = ImmutableSimpleVariable. builder()
                                                                          .name("serviceBrokerAsyncJobId")
                                                                          .build();

    Variable> SERVICE_BROKER_NAMES_JOB_IDS = ImmutableSimpleVariable.> builder()
                                                                                        .name("serviceBrokerNamesJobsIds")
                                                                                        .build();

    Variable IS_SERVICE_BINDING_KEY_OPERATION_IN_PROGRESS = ImmutableSimpleVariable. builder()
                                                                                            .name("isServiceBindingKeyOperationInProgress")
                                                                                            .defaultValue(false)
                                                                                            .build();

    Variable WAS_SERVICE_BINDING_KEY_OPERATION_ALREADY_DONE = ImmutableSimpleVariable. builder()
                                                                                              .name("wasServiceBindingKeyOperationAlreadyDone")
                                                                                              .defaultValue(false)
                                                                                              .build();

    Variable SERVICE_WITH_BIND_IN_PROGRESS = ImmutableSimpleVariable. builder()
                                                                            .name("serviceWithBindInProgress")
                                                                            .build();

    Variable WAIT_BIND_SERVICE_TIMEOUT = ImmutableSimpleVariable. builder()
                                                                          .name("waitBindServiceTimeout")
                                                                          .defaultValue(Duration.ofHours(1))
                                                                          .build();
    Variable UPLOAD_START_TIME = ImmutableSimpleVariable. builder()
                                                                       .name("uploadStartTime")
                                                                       .build();

    // TODO: keep custom serializers only for one release, delete after
    // Variable>> BATCHES_TO_PROCESS =
    // ImmutableJsonStringListVariable.> builder()
    // .name("batchesToProcess")
    // .type(new TypeReference<>() {
    // })
    // .defaultValue(Collections.emptyList())
    // .build();

    // Variable> BATCH_TO_PROCESS = ImmutableJsonStringVariable.>
    // builder()
    // .name("batchToProcess")
    // .type(new TypeReference<>() {
    // })
    // .defaultValue(Collections.emptyList())
    // .build();
    Variable>> BATCHES_TO_PROCESS = new JsonStringListVariable<>() {

        @Override
        public String getName() {
            return "batchesToProcess";
        }

        @Override
        public List> getDefaultValue() {
            return Collections.emptyList();
        }

        @Override
        public TypeReference> getType() {
            return BatchesToProcessSerializationAdapter.BATCHES_TO_PROCESS_ELEMENT_TYPE_REFERENCE;
        }

        @Override
        public Serializer>> getSerializer() {
            return new BatchesToProcessSerializationAdapter();
        }

    };

    Variable> BATCH_TO_PROCESS = new JsonStringListVariable<>() {

        @Override
        public String getName() {
            return "batchToProcess";
        }

        @Override
        public List getDefaultValue() {
            return Collections.emptyList();
        }

        @Override
        public TypeReference getType() {
            return BatchToProcessSerializationAdapter.BATCH_TO_PROCESS_ELEMENT_TYPE_REFERENCE;
        }

        @Override
        public Serializer> getSerializer() {
            return new BatchToProcessSerializationAdapter();
        }

    };

    Variable SHOULD_RECREATE_SERVICE_BINDING = ImmutableSimpleVariable. builder()
                                                                               .name("shouldRecreateServiceBinding")
                                                                               .defaultValue(false)
                                                                               .build();
    Variable SERVICE_BINDING_JOB_ID = ImmutableSimpleVariable. builder()
                                                                     .name("serviceBindingJobId")
                                                                     .build();
    Variable SERVICE_UNBINDING_JOB_ID = ImmutableSimpleVariable. builder()
                                                                       .name("serviceUnbindingJobId")
                                                                       .build();
    Variable SERVICE_KEY_CREATION_JOB_ID = ImmutableSimpleVariable. builder()
                                                                          .name("serviceKeyCreationJobId")
                                                                          .build();
    Variable SERVICE_KEY_DELETION_JOB_ID = ImmutableSimpleVariable. builder()
                                                                          .name("serviceKeyDeletionJobId")
                                                                          .build();
    Variable USE_LAST_OPERATION_FOR_SERVICE_BINDING_CREATION = ImmutableSimpleVariable. builder()
                                                                                               .name("useLastOperationForServiceBindingCreation")
                                                                                               .defaultValue(false)
                                                                                               .build();
    Variable USE_LAST_OPERATION_FOR_SERVICE_BINDING_DELETION = ImmutableSimpleVariable. builder()
                                                                                               .name("useLastOperationForServiceBindingDeletion")
                                                                                               .defaultValue(false)
                                                                                               .build();
    Variable USE_LAST_OPERATION_FOR_SERVICE_KEY_CREATION = ImmutableSimpleVariable. builder()
                                                                                           .name("useLastOperationForServiceKeyCreation")
                                                                                           .defaultValue(false)
                                                                                           .build();
    Variable USE_LAST_OPERATION_FOR_SERVICE_KEY_DELETION = ImmutableSimpleVariable. builder()
                                                                                           .name("useLastOperationForServiceKeyDeletion")
                                                                                           .defaultValue(false)
                                                                                           .build();
    Variable SERVICE_BINDING_TO_DELETE = ImmutableJsonStringVariable. builder()
                                                                                         .name("serviceBindingToDelete")
                                                                                         .type(Variable.typeReference(CloudServiceBinding.class))
                                                                                         .build();
    Variable> CLOUD_SERVICE_BINDINGS_TO_DELETE = ImmutableJsonStringListVariable. builder()
                                                                                                          .name("cloudServiceBindingsToDelete")
                                                                                                          .type(new TypeReference<>() {
                                                                                                          })
                                                                                                          .defaultValue(Collections.emptyList())
                                                                                                          .build();
    Variable> CLOUD_SERVICE_KEYS_TO_CREATE = ImmutableJsonStringListVariable. builder()
                                                                                                  .name("cloudServiceKeysToCreate")
                                                                                                  .type(new TypeReference<>() {
                                                                                                  })
                                                                                                  .defaultValue(Collections.emptyList())
                                                                                                  .build();
    Variable> CLOUD_SERVICE_KEYS_TO_DELETE = ImmutableJsonStringListVariable. builder()
                                                                                                  .name("cloudServiceKeysToDelete")
                                                                                                  .type(new TypeReference<>() {
                                                                                                  })
                                                                                                  .defaultValue(Collections.emptyList())
                                                                                                  .build();
    Variable> CLOUD_SERVICE_KEYS_TO_UPDATE_METADATA = ImmutableJsonStringListVariable. builder()
                                                                                                           .name("cloudServiceKeysToUpdate")
                                                                                                           .type(new TypeReference<>() {
                                                                                                           })
                                                                                                           .defaultValue(Collections.emptyList())
                                                                                                           .build();
    Variable> SERVICE_DELETION_ACTIONS = ImmutableEnumListVariable. builder()
                                                                                               .name("serviceDeletionActions")
                                                                                               .type(ServiceDeletionActions.class)
                                                                                               .defaultValue(Collections.emptyList())
                                                                                               .build();
    Variable SERVICE_KEY_TO_PROCESS = ImmutableJsonStringVariable. builder()
                                                                                  .name("serviceKeyToProcess")
                                                                                  .type(Variable.typeReference(CloudServiceKey.class))
                                                                                  .build();
    Variable SERVICE_KEY_DOES_NOT_EXIST = ImmutableSimpleVariable. builder()
                                                                          .name("serviceKeyDoesNotExist")
                                                                          .defaultValue(false)
                                                                          .build();
    Variable> CLOUD_SERVICE_KEYS_FOR_WAITING = ImmutableJsonStringListVariable. builder()
                                                                                                    .name("cloudServiceKeysForWaiting")
                                                                                                    .type(new TypeReference<>() {
                                                                                                    })
                                                                                                    .defaultValue(Collections.emptyList())
                                                                                                    .build();
    // we need to use a Json string serialization because the nanosecond precision is being lost when using SimpleVariable
    Variable LOGS_OFFSET_FOR_APP_EXECUTION = ImmutableJsonStringVariable. builder()
                                                                                       .name("logsOffsetForAppExecution")
                                                                                       .type(Variable.typeReference(LocalDateTime.class))
                                                                                       .defaultValue(LocalDateTime.ofInstant(Instant.EPOCH,
                                                                                                                             ZoneId.of("UTC")))
                                                                                       .build();
    // we need to use a Json string serialization because the nanosecond precision is being lost when using SimpleVariable
    Variable LOGS_OFFSET = ImmutableJsonStringVariable. builder()
                                                                     .name("logsOffset")
                                                                     .type(Variable.typeReference(LocalDateTime.class))
                                                                     .defaultValue(LocalDateTime.ofInstant(Instant.EPOCH, ZoneId.of("UTC")))
                                                                     .build();

    Variable EXISTING_APP_TO_POLL = ImmutableJsonBinaryVariable. builder()
                                                                                 .name("existingAppToPoll")
                                                                                 .type(Variable.typeReference(CloudApplication.class))
                                                                                 .build();

    Variable DELAY_AFTER_APP_STOP = ImmutableSimpleVariable. builder()
                                                                     .name("delayAfterAppStop")
                                                                     .defaultValue(Duration.ZERO)
                                                                     .build();

    Variable> DYNAMIC_RESOLVABLE_PARAMETERS = ImmutableJsonStringVariable.> builder()
                                                                                                         .name("dynamicResolvableParameters")
                                                                                                         .type(new TypeReference<>() {
                                                                                                         })
                                                                                                         .defaultValue(Collections.emptySet())
                                                                                                         .build();

    Variable DYNAMIC_RESOLVABLE_PARAMETER = ImmutableJsonStringVariable. builder()
                                                                                                   .name("dynamicResolvableParameter")
                                                                                                   .type(new TypeReference<>() {
                                                                                                   })
                                                                                                   .build();

    Variable SERVICE_IN_PROGRESS_TIMEOUT = ImmutableSimpleVariable. builder()
                                                                            .name("serviceInProgressTimeout")
                                                                            .defaultValue(Duration.ofHours(1))
                                                                            .build();
    Variable SHOULD_APPLY_INCREMENTAL_INSTANCES_UPDATE = ImmutableSimpleVariable. builder()
                                                                                         .name("shouldApplyIncrementalInstancesUpdate")
                                                                                         .defaultValue(false)
                                                                                         .build();

    Variable INCREMENTAL_APP_INSTANCE_UPDATE_CONFIGURATION = ImmutableJsonStringVariable. builder()
                                                                                                                                   .name("incrementalAppInstanceUpdateConfiguration")
                                                                                                                                   .type(new TypeReference<>() {
                                                                                                                                   })
                                                                                                                                   .build();
    Variable SKIP_APP_DIGEST_CALCULATION = ImmutableSimpleVariable. builder()
                                                                           .name("skipAppDigestCalculation")
                                                                           .defaultValue(false)
                                                                           .build();
    Variable CALCULATED_APPLICATION_DIGEST = ImmutableSimpleVariable. builder()
                                                                            .name("calculatedApplicationDigest")
                                                                            .build();
    Variable SHOULD_UPDATE_APPLICATION_DIGEST = ImmutableSimpleVariable. builder()
                                                                                .name("shouldUpdateApplicationDigest")
                                                                                .defaultValue(false)
                                                                                .build();
    Variable SHOULD_SKIP_APPLICATION_UPLOAD = ImmutableSimpleVariable. builder()
                                                                              .name("shouldSkipApplicationUpload")
                                                                              .defaultValue(false)
                                                                              .build();

    Variable> ARCHIVE_ENTRIES_POSITIONS = ImmutableJsonStringListVariable. builder()
                                                                                                               .name("archiveEntriesPositions")
                                                                                                               .type(new TypeReference<>() {
                                                                                                               })
                                                                                                               .build();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy