private ImmutableActionDescriptorStep(ImmutableActionDescriptorStep.Builder builder) { this.description = builder.description; this.name = builder.name; this.properties = createUnmodifiableMap(false, false, builder.properties); this.configuredProperties = builder.configuredPropertiesIsSet() ? createUnmodifiableMap(false, false, builder.configuredProperties) : createUnmodifiableMap(true, false, ActionDescriptor.ActionDescriptorStep.super.getConfiguredProperties()); }
private ImmutableStepDescriptor(ImmutableStepDescriptor.Builder builder) { this.kind = builder.kind; this.entrypoint = builder.entrypoint; this.resource = builder.resource; this.inputDataShape = builder.inputDataShape; this.outputDataShape = builder.outputDataShape; this.propertyDefinitionSteps = builder.propertyDefinitionStepsIsSet() ? createUnmodifiableList(true, builder.propertyDefinitionSteps) : createUnmodifiableList(false, createSafeList(StepDescriptor.super.getPropertyDefinitionSteps(), true, false)); }
/** * Construct a new immutable {@code ActionsSummary} instance. * @param actionCountByTags The value for the {@code actionCountByTags} attribute * @param totalActions The value for the {@code totalActions} attribute * @return An immutable ActionsSummary instance */ public static ActionsSummary of(Map<String, ? extends Integer> actionCountByTags, int totalActions) { return validate(new ImmutableActionsSummary(actionCountByTags, totalActions)); }
@Override ConnectorDescriptor.Builder createDescriptor(final ObjectNode json, final Swagger swagger, final Operation operation) { return new ConnectorDescriptor.Builder(); } };
@Override default StepAction withId(String id) { return new Builder().createFrom(this).id(id).build(); }
/** * Copy the current immutable object by replacing the {@link ActionDescriptor.ActionDescriptorStep#getConfiguredProperties() configuredProperties} map with the specified map. * Nulls are not permitted as keys or values. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param entries The entries to be added to the configuredProperties map * @return A modified copy of {@code this} object */ public final ImmutableActionDescriptorStep withConfiguredProperties(Map<String, ? extends String> entries) { if (this.configuredProperties == entries) return this; Map<String, String> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableActionDescriptorStep(this, this.description, this.name, this.properties, newValue)); }
/** * Copy the current immutable object by replacing the {@link ActionsSummary#getActionCountByTags() actionCountByTags} map with the specified map. * Nulls are not permitted as keys or values. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param entries The entries to be added to the actionCountByTags map * @return A modified copy of {@code this} object */ public final ImmutableActionsSummary withActionCountByTags(Map<String, ? extends Integer> entries) { if (this.actionCountByTags == entries) return this; Map<String, Integer> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableActionsSummary(this, newValue, this.totalActions)); }
/** * Construct a new immutable {@code ActionDescriptorStep} instance. * @param description The value for the {@code description} attribute * @param name The value for the {@code name} attribute * @param properties The value for the {@code properties} attribute * @param configuredProperties The value for the {@code configuredProperties} attribute * @return An immutable ActionDescriptorStep instance */ public static ActionDescriptor.ActionDescriptorStep of(String description, String name, Map<String, ? extends ConfigurationProperty> properties, Map<String, ? extends String> configuredProperties) { return validate(new ImmutableActionDescriptorStep(description, name, properties, configuredProperties)); }
/** * Construct a new immutable {@code StepDescriptor} instance. * @param kind The value for the {@code kind} attribute * @param entrypoint The value for the {@code entrypoint} attribute * @param resource The value for the {@code resource} attribute * @param inputDataShape The value for the {@code inputDataShape} attribute * @param outputDataShape The value for the {@code outputDataShape} attribute * @param propertyDefinitionSteps The value for the {@code propertyDefinitionSteps} attribute * @return An immutable StepDescriptor instance */ public static StepDescriptor of(StepAction.Kind kind, String entrypoint, String resource, Optional<DataShape> inputDataShape, Optional<DataShape> outputDataShape, Iterable<? extends ActionDescriptor.ActionDescriptorStep> propertyDefinitionSteps) { return validate(new ImmutableStepDescriptor(kind, entrypoint, resource, inputDataShape, outputDataShape, propertyDefinitionSteps)); }
/** * Builds a new {@link ConnectorAction ConnectorAction}. * @return An immutable instance of ConnectorAction * @throws java.lang.IllegalStateException if any required attributes are missing */ public ConnectorAction build() { return ImmutableConnectorAction.validate(new ImmutableConnectorAction(this)); }
/** * Builds a new {@link StepAction StepAction}. * @return An immutable instance of StepAction * @throws java.lang.IllegalStateException if any required attributes are missing */ public StepAction build() { return ImmutableStepAction.validate(new ImmutableStepAction(this)); }
/** * Builds a new {@link StepDescriptor StepDescriptor}. * @return An immutable instance of StepDescriptor * @throws java.lang.IllegalStateException if any required attributes are missing */ public StepDescriptor build() { return ImmutableStepDescriptor.validate(new ImmutableStepDescriptor(this)); }
private ImmutableActionDescriptorStep( String description, String name, Map<String, ? extends ConfigurationProperty> properties, Map<String, ? extends String> configuredProperties) { this.description = description; this.name = name; this.properties = createUnmodifiableMap(true, false, properties); this.configuredProperties = createUnmodifiableMap(true, false, configuredProperties); }
/** * Builds a new {@link ActionDescriptor.ActionDescriptorStep ActionDescriptorStep}. * @return An immutable instance of ActionDescriptorStep * @throws java.lang.IllegalStateException if any required attributes are missing */ public ActionDescriptor.ActionDescriptorStep build() { return ImmutableActionDescriptorStep.validate(new ImmutableActionDescriptorStep(this)); }
/** * Builds a new {@link ActionsSummary ActionsSummary}. * @return An immutable instance of ActionsSummary * @throws java.lang.IllegalStateException if any required attributes are missing */ public ActionsSummary build() { return ImmutableActionsSummary.validate(new ImmutableActionsSummary(null, createUnmodifiableMap(false, false, actionCountByTags), totalActions)); } }
/** * Builds a new {@link ConnectorDescriptor ConnectorDescriptor}. * @return An immutable instance of ConnectorDescriptor * @throws java.lang.IllegalStateException if any required attributes are missing */ public ConnectorDescriptor build() { return ImmutableConnectorDescriptor.validate(new ImmutableConnectorDescriptor(this)); }
/** * Construct a new immutable {@code StepDescriptor} instance. * @param kind The value for the {@code kind} attribute * @param entrypoint The value for the {@code entrypoint} attribute * @param resource The value for the {@code resource} attribute * @param inputDataShape The value for the {@code inputDataShape} attribute * @param outputDataShape The value for the {@code outputDataShape} attribute * @param propertyDefinitionSteps The value for the {@code propertyDefinitionSteps} attribute * @return An immutable StepDescriptor instance */ public static StepDescriptor of(StepAction.Kind kind, String entrypoint, String resource, Optional<DataShape> inputDataShape, Optional<DataShape> outputDataShape, List<ActionDescriptor.ActionDescriptorStep> propertyDefinitionSteps) { return of(kind, entrypoint, resource, inputDataShape, outputDataShape, (Iterable<? extends ActionDescriptor.ActionDescriptorStep>) propertyDefinitionSteps); }
@Override ConnectorDescriptor.Builder createDescriptor(final ObjectNode json, final Swagger swagger, final Operation operation) { return new ConnectorDescriptor.Builder(); } };
/** * Copy the current immutable object by replacing the {@link ActionDescriptor.ActionDescriptorStep#getProperties() properties} map with the specified map. * Nulls are not permitted as keys or values. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param entries The entries to be added to the properties map * @return A modified copy of {@code this} object */ public final ImmutableActionDescriptorStep withProperties(Map<String, ? extends ConfigurationProperty> entries) { if (this.properties == entries) return this; Map<String, ConfigurationProperty> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableActionDescriptorStep(this, this.description, this.name, newValue, this.configuredProperties)); }
/** * Copy the current immutable object by setting a value for the {@link ActionsSummary#getTotalActions() totalActions} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for totalActions * @return A modified copy of the {@code this} object */ public final ImmutableActionsSummary withTotalActions(int value) { if (this.totalActions == value) return this; return validate(new ImmutableActionsSummary(this, this.actionCountByTags, value)); }