UNPKG

@finos/legend-server-sdlc

Version:
60 lines 2.84 kB
/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { ProjectDependency } from './ProjectDependency.js'; import { ProjectStructureVersion } from './ProjectStructureVersion.js'; import { createModelSchema, list, optional, primitive, serialize, SKIP, } from 'serializr'; import { optionalCustom, SerializationFactory, serializeArray, optionalCustomUsingModelSchema, usingModelSchema, } from '@finos/legend-shared'; import { PlatformConfiguration } from './PlatformConfiguration.js'; export class UpdatePlatformConfigurationsCommand { platformConfigurations; constructor(platformConfigurations) { this.platformConfigurations = platformConfigurations; } static serialization = new SerializationFactory(createModelSchema(PlatformConfiguration, { platformConfigurations: optionalCustom((val) => val === undefined ? null : serializeArray(val, (value) => serialize(PlatformConfiguration.serialization.schema, value)), () => SKIP), })); } export class UpdateProjectConfigurationCommand { artifactId; groupId; message; platformConfigurations; projectDependenciesToAdd; projectDependenciesToRemove; projectStructureVersion; projectType; runDependencyTests; constructor(groupId, artifactId, projectStructureVersion, message) { this.groupId = groupId; this.artifactId = artifactId; this.projectStructureVersion = projectStructureVersion; this.message = message; } static serialization = new SerializationFactory(createModelSchema(UpdateProjectConfigurationCommand, { artifactId: primitive(), groupId: primitive(), message: primitive(), platformConfigurations: optional(usingModelSchema(UpdatePlatformConfigurationsCommand.serialization.schema)), projectDependenciesToAdd: list(usingModelSchema(ProjectDependency.serialization.schema)), projectDependenciesToRemove: list(usingModelSchema(ProjectDependency.serialization.schema)), projectStructureVersion: optionalCustomUsingModelSchema(ProjectStructureVersion.serialization.schema), projectType: optional(primitive()), runDependencyTests: optional(primitive()), })); } //# sourceMappingURL=ProjectConfigurationCommands.js.map