You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/03/11 11:46:49 UTC

[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #1268: MINIFICPP-1743 Added PutGCSObject processor

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



##########
File path: extensions/gcp/controllerservices/GcpCredentialsControllerService.h
##########
@@ -0,0 +1,85 @@
+/**
+ * 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 <filesystem>
+#include <string>
+#include <memory>
+
+#include "core/controller/ControllerService.h"
+#include "core/logging/Logger.h"
+#include "core/logging/LoggerConfiguration.h"
+#include "utils/Enum.h"
+
+#include "google/cloud/storage/oauth2/credentials.h"
+
+namespace org::apache::nifi::minifi::extensions::gcp {
+
+class GcpCredentialsControllerService : public core::controller::ControllerService {
+ public:
+  SMART_ENUM(CredentialsLocation,
+             (USE_DEFAULT_CREDENTIALS, "Google Application Default Credentials"),
+             (USE_COMPUTE_ENGINE_CREDENTIALS, "Use Compute Engine Credentials"),
+             (USE_JSON_FILE, "Service Account JSON File"),
+             (USE_JSON_CONTENTS, "Service Account JSON"),
+             (USE_ANONYMOUS_CREDENTIALS, "Use Anonymous credentials"));
+
+  EXTENSIONAPI static const core::Property CredentialsLoc;
+  EXTENSIONAPI static const core::Property JsonFilePath;
+  EXTENSIONAPI static const core::Property JsonContents;
+
+  explicit GcpCredentialsControllerService(const std::string& name, const minifi::utils::Identifier& uuid = {})
+      : ControllerService(name, uuid) {
+  }
+
+  explicit GcpCredentialsControllerService(const std::string& name, const std::shared_ptr<Configure>& /*configuration*/)
+      : ControllerService(name) {
+  }
+
+  GcpCredentialsControllerService(const GcpCredentialsControllerService&) = delete;
+  GcpCredentialsControllerService(GcpCredentialsControllerService&&) = delete;
+  GcpCredentialsControllerService& operator=(const GcpCredentialsControllerService&) = delete;
+  GcpCredentialsControllerService& operator=(GcpCredentialsControllerService&&) = delete;
+  ~GcpCredentialsControllerService() override = default;

Review comment:
       note: all ConfigurableComponents (which ControllerService is a subclass of) are non-movable/non-copiable




-- 
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-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org