martinzink commented on a change in pull request #1268:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1268#discussion_r812813573



##########
File path: extensions/gcp/processors/PutGcsObject.h
##########
@@ -0,0 +1,91 @@
+/**
+ * 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.
+ */
+
+#pragma once
+
+#include <string>
+#include <memory>
+
+#include "core/Processor.h"
+#include "core/logging/Logger.h"
+#include "core/logging/LoggerConfiguration.h"
+#include "../controllerservices/GcpCredentialsControllerService.h"
+#include "google/cloud/storage/client.h"
+#include "google/cloud/storage/retry_policy.h"
+#include "utils/Enum.h"
+
+namespace org::apache::nifi::minifi::extensions::gcp {
+
+class PutGcsObject : public core::Processor {
+ public:
+  SMART_ENUM(PredefinedAcl,
+             (AUTHENTICATED_READ, "authenticatedRead"),
+             (BUCKET_OWNER_FULL_CONTROL, "bucketOwnerFullControl"),
+             (BUCKET_OWNER_READ_ONLY, "bucketOwnerRead"),
+             (PRIVATE, "private"),
+             (PROJECT_PRIVATE, "projectPrivate"),
+             (PUBLIC_READ_ONLY, "publicRead"),
+             (PUBLIC_READ_WRITE, "publicReadWrite"));
+
+  explicit PutGcsObject(const std::string& name, const utils::Identifier& uuid 
= {})
+      : core::Processor(name, uuid) {
+  }
+  PutGcsObject(const PutGcsObject&) = delete;
+  PutGcsObject(PutGcsObject&&) = delete;
+  PutGcsObject& operator=(const PutGcsObject&) = delete;
+  PutGcsObject& operator=(PutGcsObject&&) = delete;
+  ~PutGcsObject() override = default;
+
+  EXTENSIONAPI static const core::Property GCPCredentials;
+  EXTENSIONAPI static const core::Property Bucket;
+  EXTENSIONAPI static const core::Property ObjectName;
+
+  EXTENSIONAPI static const core::Property NumberOfRetries;
+
+  EXTENSIONAPI static const core::Property ContentType;
+  EXTENSIONAPI static const core::Property MD5HashLocation;
+  EXTENSIONAPI static const core::Property Crc32cChecksumLocation;
+  EXTENSIONAPI static const core::Property EncryptionKey;
+  EXTENSIONAPI static const core::Property ObjectACL;
+  EXTENSIONAPI static const core::Property OverwriteObject;
+
+  EXTENSIONAPI static const core::Relationship Success;
+  EXTENSIONAPI static const core::Relationship Failure;
+
+  void initialize() override;
+  void onSchedule(const std::shared_ptr<core::ProcessContext> &context, const 
std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) override;
+  void onTrigger(const std::shared_ptr<core::ProcessContext>& context, const 
std::shared_ptr<core::ProcessSession>& session) override;
+
+  core::annotation::Input getInputRequirement() const override {
+    return core::annotation::Input::INPUT_REQUIRED;
+  }
+
+  bool isSingleThreaded() const override {
+    return true;

Review comment:
       In theory this could be enabled, but it would need some more testing.
   I'll investigate in a followup Jira if thats okay. 
https://issues.apache.org/jira/browse/MINIFICPP-1761

##########
File path: extensions/gcp/utils/GCPAttributes.h
##########
@@ -0,0 +1,45 @@
+/**

Review comment:
       Moved it in 
https://github.com/apache/nifi-minifi-cpp/pull/1268/commits/da24c2f58d250f0cf02f29eb499d1b1a237a366a




-- 
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