UNPKG

@hashgraph/solo

Version:

An opinionated CLI tool to deploy and manage private Hedera Networks.

34 lines (33 loc) 1.47 kB
/** * SPDX-License-Identifier: Apache-2.0 */ import { ComponentType } from '../enumerations.js'; import { type ClusterRef, type Component, type ComponentName, type NamespaceNameAsString } from '../types.js'; import { type ToObject, type Validate } from '../../../../types/index.js'; /** * Represents the base structure and common functionality for all components within the system. * This class provides validation, comparison, and serialization functionality for components. */ export declare abstract class BaseComponent implements Component, Validate, ToObject<Component> { readonly type: ComponentType; readonly name: ComponentName; readonly cluster: ClusterRef; readonly namespace: NamespaceNameAsString; /** * @param type - type for identifying. * @param name - the name to distinguish components. * @param cluster - the cluster in which the component is deployed. * @param namespace - the namespace associated with the component. */ protected constructor(type: ComponentType, name: ComponentName, cluster: ClusterRef, namespace: NamespaceNameAsString); /** * Compares two BaseComponent instances for equality. * * @param x - The first component to compare * @param y - The second component to compare * @returns boolean - true if the components are equal */ static compare(x: BaseComponent, y: BaseComponent): boolean; validate(): void; toObject(): Component; }