lordgamez commented on a change in pull request #1196: URL: https://github.com/apache/nifi-minifi-cpp/pull/1196#discussion_r789616097
########## File path: extensions/azure/processors/DeleteAzureBlobStorage.cpp ########## @@ -0,0 +1,104 @@ +/** + * @file DeleteAzureBlobStorage.cpp + * DeleteAzureBlobStorage class implementation + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +#include "DeleteAzureBlobStorage.h" + +#include "core/Resource.h" +#include "utils/ProcessorConfigUtils.h" + +namespace org::apache::nifi::minifi::azure::processors { + +const core::Property DeleteAzureBlobStorage::DeleteSnapshotsOption( + core::PropertyBuilder::createProperty("Delete Snapshots Option") + ->withDescription("Specifies the snapshot deletion options to be used when deleting a blob. None: Deletes the blob only. Include Snapshots: Delete the blob and its snapshots. " + "Delete Snapshots Only: Delete only the blob's snapshots.") + ->isRequired(true) + ->withDefaultValue<std::string>(toString(storage::OptionalDeletion::NONE)) + ->withAllowableValues<std::string>(storage::OptionalDeletion::values()) + ->build()); + +const core::Relationship DeleteAzureBlobStorage::Success("success", "All successfully processed FlowFiles are routed to this relationship"); +const core::Relationship DeleteAzureBlobStorage::Failure("failure", "Unsuccessful operations will be transferred to the failure relationship"); + +void DeleteAzureBlobStorage::initialize() { + // Set the supported properties + setSupportedProperties({ + AzureStorageCredentialsService, + ContainerName, + StorageAccountName, + StorageAccountKey, + SASToken, + CommonStorageAccountEndpointSuffix, + ConnectionString, + Blob, + DeleteSnapshotsOption, + UseManagedIdentityCredentials + }); + // Set the supported relationships + setSupportedRelationships({ + Success, + Failure + }); +} + +void DeleteAzureBlobStorage::onSchedule(const std::shared_ptr<core::ProcessContext>& context, const std::shared_ptr<core::ProcessSessionFactory>& session_factory) { + gsl_Expects(context && session_factory); + AzureBlobStorageProcessorBase::onSchedule(context, session_factory); + optional_deletion_ = storage::OptionalDeletion::parse( Review comment: Good idea, updated in 752968bd6175b59ca1474a3ca344b6d3c444b742 -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org