szaszm commented on code in PR #2220:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2220#discussion_r3789973261


##########
minifi_rust/extensions/minifi_rs_playground/src/processors/generate_flow_file/properties.rs:
##########
@@ -15,64 +15,34 @@
 // specific language governing permissions and limitations
 // under the License.
 
-use minifi_native::{Property, StandardPropertyValidator};
+use super::DataFormat;
+use minifi_native::{DataSize, Property};
 
-pub(crate) const FILE_SIZE: Property = Property {
-    name: "File Size",
-    description: "The size of the file that will be used",
-    is_required: true,
-    is_sensitive: false,
-    supports_expr_lang: true,
-    default_value: Some("1 kB"),
-    validator: StandardPropertyValidator::DataSizeValidator,
-    allowed_values: &[],
-    allowed_type: None,
-};
+pub(crate) const FILE_SIZE: Property<DataSize> =
+    Property::new("File Size", "The size of the file that will be used")
+        .supports_expression_language()
+        .with_default("1 kB");
 
-pub(crate) const BATCH_SIZE: Property = Property {
-    name: "Batch Size",
-    description: "The number of FlowFiles to be transferred in each 
invocation",
-    is_required: true,
-    is_sensitive: false,
-    supports_expr_lang: false,
-    default_value: Some("1"),
-    validator: StandardPropertyValidator::U64Validator,
-    allowed_values: &[],
-    allowed_type: None,
-};
+pub(crate) const BATCH_SIZE: Property<u64> = Property::new(
+    "Batch Size",
+    "The number of FlowFiles to be transferred in each invocation",
+)
+.with_default("1");

Review Comment:
   tbh it's fine to leave it as is, but the formatting seems like a formatter 
bug to me



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to