adding mongo base matadata catalog and replica catalog
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b61cfcd3 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b61cfcd3 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b61cfcd3 Branch: refs/heads/develop Commit: b61cfcd37bda7168566ff4028fa52215aa810357 Parents: 92cc0df Author: scnakandala <[email protected]> Authored: Wed Dec 23 12:59:13 2015 -0500 Committer: scnakandala <[email protected]> Committed: Wed Dec 23 12:59:13 2015 -0500 ---------------------------------------------------------------------- .../api/client/AiravataClientFactory.java | 82 - .../airavata/client/AiravataClientFactory.java | 82 + .../lib/airavata/Airavata_server.skeleton.cpp | 5 - .../lib/airavata/airavata_data_models_types.h | 1 + .../file__transfer_models_constants.cpp | 4 +- .../airavata/file__transfer_models_constants.h | 4 +- .../airavata/file__transfer_models_types.cpp | 386 ++- .../lib/airavata/file__transfer_models_types.h | 96 +- .../lib/airavata/metadata_models_constants.cpp | 34 + .../lib/airavata/metadata_models_constants.h | 41 + .../lib/airavata/metadata_models_types.cpp | 375 +++ .../lib/airavata/metadata_models_types.h | 172 ++ .../lib/airavata/replica_models_constants.cpp | 4 +- .../lib/airavata/replica_models_constants.h | 4 +- .../lib/airavata/replica_models_types.cpp | 1052 ++++--- .../lib/airavata/replica_models_types.h | 383 ++- .../lib/Airavata/Model/File/Replica/Types.php | 1028 +++++++ .../lib/Airavata/Model/File/Transfer/Types.php | 890 ++++++ .../resources/lib/Airavata/Model/File/Types.php | 795 ------ .../lib/Airavata/Model/File/metadata/Types.php | 371 +++ .../lib/Airavata/Model/Replica/Types.php | 923 ------ .../resources/lib/AiravataClientFactory.php | 77 - .../main/resources/lib/Thrift/Base/TBase.php | 367 --- .../Thrift/ClassLoader/ThriftClassLoader.php | 223 -- .../Thrift/Exception/TApplicationException.php | 72 - .../lib/Thrift/Exception/TException.php | 369 --- .../lib/Thrift/Exception/TProtocolException.php | 48 - .../Thrift/Exception/TTransportException.php | 41 - .../Thrift/Factory/TBinaryProtocolFactory.php | 43 - .../Thrift/Factory/TCompactProtocolFactory.php | 39 - .../lib/Thrift/Factory/TJSONProtocolFactory.php | 41 - .../lib/Thrift/Factory/TProtocolFactory.php | 35 - .../lib/Thrift/Factory/TStringFuncFactory.php | 63 - .../lib/Thrift/Factory/TTransportFactory.php | 16 - .../lib/Thrift/Protocol/JSON/BaseContext.php | 39 - .../lib/Thrift/Protocol/JSON/ListContext.php | 52 - .../Thrift/Protocol/JSON/LookaheadReader.php | 54 - .../lib/Thrift/Protocol/JSON/PairContext.php | 60 - .../lib/Thrift/Protocol/TBinaryProtocol.php | 396 --- .../Protocol/TBinaryProtocolAccelerated.php | 47 - .../lib/Thrift/Protocol/TCompactProtocol.php | 669 ----- .../lib/Thrift/Protocol/TJSONProtocol.php | 694 ----- .../resources/lib/Thrift/Protocol/TProtocol.php | 340 --- .../lib/Thrift/Serializer/TBinarySerializer.php | 73 - .../lib/Thrift/Server/TForkingServer.php | 119 - .../resources/lib/Thrift/Server/TServer.php | 101 - .../lib/Thrift/Server/TServerSocket.php | 98 - .../lib/Thrift/Server/TServerTransport.php | 54 - .../lib/Thrift/Server/TSimpleServer.php | 57 - .../resources/lib/Thrift/StringFunc/Core.php | 38 - .../lib/Thrift/StringFunc/Mbstring.php | 45 - .../lib/Thrift/StringFunc/TStringFunc.php | 27 - .../src/main/resources/lib/Thrift/Thrift.php | 789 ----- .../lib/Thrift/Transport/TBufferedTransport.php | 165 -- .../lib/Thrift/Transport/TFramedTransport.php | 183 -- .../lib/Thrift/Transport/THttpClient.php | 221 -- .../lib/Thrift/Transport/TMemoryBuffer.php | 89 - .../lib/Thrift/Transport/TNullTransport.php | 50 - .../lib/Thrift/Transport/TPhpStream.php | 114 - .../resources/lib/Thrift/Transport/TSocket.php | 326 --- .../lib/Thrift/Transport/TSocketPool.php | 295 -- .../lib/Thrift/Transport/TTransport.php | 93 - .../resources/lib/Thrift/Type/TMessageType.php | 33 - .../main/resources/lib/Thrift/Type/TType.php | 46 - .../src/main/resources/lib/Thrift/autoload.php | 51 - .../lib/apache/airavata/model/file/__init__.py | 1 - .../lib/apache/airavata/model/file/constants.py | 11 - .../airavata/model/file/metadata/__init__.py | 1 + .../airavata/model/file/metadata/constants.py | 11 + .../airavata/model/file/metadata/ttypes.py | 232 ++ .../airavata/model/file/replica/__init__.py | 1 + .../airavata/model/file/replica/constants.py | 11 + .../airavata/model/file/replica/ttypes.py | 663 +++++ .../airavata/model/file/transfer/__init__.py | 1 + .../airavata/model/file/transfer/constants.py | 11 + .../airavata/model/file/transfer/ttypes.py | 597 ++++ .../lib/apache/airavata/model/file/ttypes.py | 550 ---- .../apache/airavata/model/replica/__init__.py | 1 - .../apache/airavata/model/replica/constants.py | 11 - .../lib/apache/airavata/model/replica/ttypes.py | 574 ---- .../lib/apache/airavata/model/ttypes.py | 5 +- .../src/main/resources/lib/thrift/TSCons.py | 35 - .../main/resources/lib/thrift/TSerialization.py | 38 - .../src/main/resources/lib/thrift/TTornado.py | 153 - .../src/main/resources/lib/thrift/Thrift.py | 170 -- .../src/main/resources/lib/thrift/__init__.py | 20 - .../main/resources/lib/thrift/protocol/TBase.py | 81 - .../lib/thrift/protocol/TBinaryProtocol.py | 261 -- .../lib/thrift/protocol/TCompactProtocol.py | 405 --- .../lib/thrift/protocol/TJSONProtocol.py | 552 ---- .../resources/lib/thrift/protocol/TProtocol.py | 406 --- .../resources/lib/thrift/protocol/__init__.py | 20 - .../resources/lib/thrift/protocol/fastbinary.c | 1219 -------- .../resources/lib/thrift/server/THttpServer.py | 87 - .../lib/thrift/server/TNonblockingServer.py | 346 --- .../lib/thrift/server/TProcessPoolServer.py | 118 - .../main/resources/lib/thrift/server/TServer.py | 269 -- .../resources/lib/thrift/server/__init__.py | 20 - .../lib/thrift/transport/THttpClient.py | 147 - .../lib/thrift/transport/TSSLSocket.py | 214 -- .../resources/lib/thrift/transport/TSocket.py | 176 -- .../lib/thrift/transport/TTransport.py | 330 --- .../resources/lib/thrift/transport/TTwisted.py | 221 -- .../lib/thrift/transport/TZlibTransport.py | 249 -- .../resources/lib/thrift/transport/__init__.py | 20 - .../client/samples/CancelExperiments.java | 2 +- .../client/samples/CreateLaunchBES.java | 2 +- .../client/samples/CreateLaunchExperiment.java | 2 +- .../samples/CreateLaunchExperimentUS3.java | 2 +- .../client/samples/RegisterSampleData.java | 2 +- .../client/secure/client/SecureClient.java | 2 +- .../tools/RegisterOGCEUS3Application.java | 2 +- .../tools/RegisterSampleApplications.java | 2 +- .../client/tools/RegisterUS3Application.java | 2 +- .../apache/airavata/model/file/FileNode.java | 1147 -------- .../airavata/model/file/FileNodeTypes.java | 62 - .../airavata/model/file/FileTransferMode.java | 62 - .../model/file/FileTransferRequest.java | 2328 --------------- .../airavata/model/file/FileTransferStatus.java | 71 - .../model/file/StorageResourceProtocol.java | 74 - .../model/file/metadata/MetadataModel.java | 1474 ++++++++++ .../model/file/metadata/MetadataType.java | 62 + .../model/file/replica/FileCollectionModel.java | 1247 ++++++++ .../airavata/model/file/replica/FileModel.java | 1879 ++++++++++++ .../model/file/replica/FileModelType.java | 62 + .../model/file/replica/FileReplicaModel.java | 1272 +++++++++ .../file/replica/ReplicaPersistentType.java | 62 + .../model/file/replica/StorageResourceType.java | 71 + .../model/file/transfer/FileTransferMode.java | 62 + .../file/transfer/FileTransferRequestModel.java | 2695 ++++++++++++++++++ .../model/file/transfer/FileTransferStatus.java | 71 + .../model/file/transfer/LSEntryModel.java | 1147 ++++++++ .../model/file/transfer/LSEntryType.java | 62 + .../file/transfer/StorageResourceProtocol.java | 74 + .../model/replica/DataReplicaLocationModel.java | 1741 ----------- .../model/replica/DataResourceModel.java | 2049 ------------- .../model/replica/DataResourceType.java | 62 - .../model/replica/ReplicaLocationCategory.java | 68 - .../model/replica/ReplicaPersistentType.java | 62 - .../file/manager/core/FileManagerFactory.java | 2 +- .../file/manager/core/FileManagerImpl.java | 48 +- .../manager/core/FileTransferServiceImpl.java | 126 +- .../manager/core/MetadataCatalogService.java | 76 + .../core/MetadataCatalogServiceImpl.java | 105 + .../manager/core/ReplicaCatalogServiceImpl.java | 172 ++ .../FileTransferRequestDeserializer.java | 45 - .../FileTransferRequestSerializer.java | 40 - .../db/conversion/ModelConversionHelper.java | 26 +- .../metadata/MetadataDeserializer.java | 45 + .../conversion/metadata/MetadataSerializer.java | 42 + .../replica/FileCollectionDeserializer.java | 44 + .../replica/FileCollectionSerializer.java | 41 + .../db/conversion/replica/FileDeserializer.java | 44 + .../db/conversion/replica/FileSerializer.java | 41 + .../FileTransferRequestDeserializer.java | 44 + .../transfer/FileTransferRequestSerializer.java | 41 + .../manager/core/db/dao/FileCollectionDao.java | 93 + .../file/manager/core/db/dao/FileDao.java | 93 + .../core/db/dao/FileTransferRequestDao.java | 53 +- .../file/manager/core/db/dao/MetadataDao.java | 94 + .../core/remote/client/RemoteStorageClient.java | 5 +- .../remote/client/http/HTTPStorageClient.java | 6 +- .../remote/client/scp/SCPStorageClient.java | 4 +- .../remote/client/sftp/SFTPStorageClient.java | 14 +- .../airavata/file/manager/cpi/FileManager.java | 18 + .../file/manager/cpi/FileManagerConstants.java | 4 + .../file/manager/cpi/FileTransferService.java | 22 +- .../manager/cpi/MetadataCatalogService.java | 56 + .../file/manager/cpi/ReplicaCatalogService.java | 86 + .../manager/cpi/ReplicaManagementService.java | 25 - .../multitenantedairavata/AiravataClient.java | 2 +- .../airavata-apis/airavata_api.thrift | 1 - .../data-models/airavata_data_models.thrift | 1 + .../file__transfer_models.thrift | 55 +- .../file-manager-models/metadata_models.thrift | 22 + .../file-manager-models/replica_models.thrift | 82 +- .../generate-thrift-stubs.sh | 9 +- 177 files changed, 17319 insertions(+), 24214 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/b61cfcd3/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/client/AiravataClientFactory.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/client/AiravataClientFactory.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/client/AiravataClientFactory.java deleted file mode 100644 index a448192..0000000 --- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/client/AiravataClientFactory.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * - * 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. - * - */ - -package org.apache.airavata.api.client; - -import org.apache.airavata.api.Airavata; - -import org.apache.airavata.model.error.AiravataClientException; -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.protocol.TProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.thrift.transport.TSSLTransportFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class AiravataClientFactory { - - private final static Logger logger = LoggerFactory.getLogger(AiravataClientFactory.class); - - public static Airavata.Client createAiravataClient(String serverHost, int serverPort) throws AiravataClientException{ - try { - TTransport transport = new TSocket(serverHost, serverPort); - transport.open(); - TProtocol protocol = new TBinaryProtocol(transport); -// TMultiplexedProtocol mp = new TMultiplexedProtocol(protocol, "APIServer"); - return new Airavata.Client(protocol); - } catch (TTransportException e) { - AiravataClientException exception = new AiravataClientException(); - exception.setParameter("Unable to connect to the server at "+serverHost+":"+serverPort); - throw exception; - } - } - - /** - * This method returns a Airavata Client that talks to the API Server exposed over TLS. - * - * @param serverHost - * @param serverPort - * @param trustStorePath - * @param trustStorePassword - * @param clientTimeOut - * @return - * @throws AiravataClientConnectException - */ - public static Airavata.Client createAiravataSecureClient(String serverHost, int serverPort, String trustStorePath, - String trustStorePassword, int clientTimeOut) - throws AiravataClientException { - try { - TSSLTransportFactory.TSSLTransportParameters params = - new TSSLTransportFactory.TSSLTransportParameters(); - params.setTrustStore(trustStorePath, trustStorePassword); - TSocket transport = TSSLTransportFactory.getClientSocket(serverHost, serverPort, clientTimeOut, params); - TProtocol protocol = new TBinaryProtocol(transport); - return new Airavata.Client(protocol); - } catch (TTransportException e) { - logger.error(e.getMessage(), e); - AiravataClientException clientError = new AiravataClientException(); - clientError.setParameter("Unable to connect to the server at " + serverHost + ":" + serverPort); - throw clientError; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/b61cfcd3/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/client/AiravataClientFactory.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/client/AiravataClientFactory.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/client/AiravataClientFactory.java new file mode 100644 index 0000000..24c240f --- /dev/null +++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/client/AiravataClientFactory.java @@ -0,0 +1,82 @@ +/* + * + * 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. + * + */ + +package org.apache.airavata.client; + +import org.apache.airavata.api.Airavata; + +import org.apache.airavata.model.error.AiravataClientException; +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.transport.TSocket; +import org.apache.thrift.transport.TTransport; +import org.apache.thrift.transport.TTransportException; +import org.apache.thrift.transport.TSSLTransportFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class AiravataClientFactory { + + private final static Logger logger = LoggerFactory.getLogger(AiravataClientFactory.class); + + public static Airavata.Client createAiravataClient(String serverHost, int serverPort) throws AiravataClientException{ + try { + TTransport transport = new TSocket(serverHost, serverPort); + transport.open(); + TProtocol protocol = new TBinaryProtocol(transport); +// TMultiplexedProtocol mp = new TMultiplexedProtocol(protocol, "APIServer"); + return new Airavata.Client(protocol); + } catch (TTransportException e) { + AiravataClientException exception = new AiravataClientException(); + exception.setParameter("Unable to connect to the server at "+serverHost+":"+serverPort); + throw exception; + } + } + + /** + * This method returns a Airavata Client that talks to the API Server exposed over TLS. + * + * @param serverHost + * @param serverPort + * @param trustStorePath + * @param trustStorePassword + * @param clientTimeOut + * @return + * @throws AiravataClientConnectException + */ + public static Airavata.Client createAiravataSecureClient(String serverHost, int serverPort, String trustStorePath, + String trustStorePassword, int clientTimeOut) + throws AiravataClientException { + try { + TSSLTransportFactory.TSSLTransportParameters params = + new TSSLTransportFactory.TSSLTransportParameters(); + params.setTrustStore(trustStorePath, trustStorePassword); + TSocket transport = TSSLTransportFactory.getClientSocket(serverHost, serverPort, clientTimeOut, params); + TProtocol protocol = new TBinaryProtocol(transport); + return new Airavata.Client(protocol); + } catch (TTransportException e) { + logger.error(e.getMessage(), e); + AiravataClientException clientError = new AiravataClientException(); + clientError.setParameter("Unable to connect to the server at " + serverHost + ":" + serverPort); + throw clientError; + } + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/b61cfcd3/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp index 26eba0c..382818b 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp @@ -230,11 +230,6 @@ class AiravataHandler : virtual public AiravataIf { printf("getAllUserSSHPubKeys\n"); } - void getAllGatewaySSHPubKeys(std::map<std::string, std::string> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId) { - // Your implementation goes here - printf("getAllGatewaySSHPubKeys\n"); - } - /** * Get all Public Keys of the Gateway * http://git-wip-us.apache.org/repos/asf/airavata/blob/b61cfcd3/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_data_models_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_data_models_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_data_models_types.h index 3c27a26..d059a0e 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_data_models_types.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_data_models_types.h @@ -46,6 +46,7 @@ #include "data_movement_models_types.h" #include "replica_models_types.h" #include "file__transfer_models_types.h" +#include "metadata_models_types.h" namespace apache { namespace airavata { namespace model { http://git-wip-us.apache.org/repos/asf/airavata/blob/b61cfcd3/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_constants.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_constants.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_constants.cpp index 1d8b35f..c2927ce 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_constants.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_constants.cpp @@ -23,12 +23,12 @@ */ #include "file__transfer_models_constants.h" -namespace apache { namespace airavata { namespace model { namespace file { +namespace apache { namespace airavata { namespace model { namespace file { namespace transfer { const file__transfer_modelsConstants g_file__transfer_models_constants; file__transfer_modelsConstants::file__transfer_modelsConstants() { } -}}}} // namespace +}}}}} // namespace http://git-wip-us.apache.org/repos/asf/airavata/blob/b61cfcd3/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_constants.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_constants.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_constants.h index bec2680..eb49228 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_constants.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_constants.h @@ -26,7 +26,7 @@ #include "file__transfer_models_types.h" -namespace apache { namespace airavata { namespace model { namespace file { +namespace apache { namespace airavata { namespace model { namespace file { namespace transfer { class file__transfer_modelsConstants { public: @@ -36,6 +36,6 @@ class file__transfer_modelsConstants { extern const file__transfer_modelsConstants g_file__transfer_models_constants; -}}}} // namespace +}}}}} // namespace #endif http://git-wip-us.apache.org/repos/asf/airavata/blob/b61cfcd3/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_types.cpp index 84240c5..f8e894f 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_types.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_types.cpp @@ -28,7 +28,7 @@ #include <thrift/TToString.h> -namespace apache { namespace airavata { namespace model { namespace file { +namespace apache { namespace airavata { namespace model { namespace file { namespace transfer { int _kStorageResourceProtocolValues[] = { StorageResourceProtocol::SCP, @@ -48,15 +48,15 @@ const char* _kStorageResourceProtocolNames[] = { }; const std::map<int, const char*> _StorageResourceProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kStorageResourceProtocolValues, _kStorageResourceProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); -int _kFileNodeTypesValues[] = { - FileNodeTypes::DIRECTORY, - FileNodeTypes::FILE +int _kLSEntryTypeValues[] = { + LSEntryType::DIRECTORY, + LSEntryType::FILE }; -const char* _kFileNodeTypesNames[] = { +const char* _kLSEntryTypeNames[] = { "DIRECTORY", "FILE" }; -const std::map<int, const char*> _FileNodeTypes_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kFileNodeTypesValues, _kFileNodeTypesNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +const std::map<int, const char*> _LSEntryType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kLSEntryTypeValues, _kLSEntryTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); int _kFileTransferModeValues[] = { FileTransferMode::SYNC, @@ -85,106 +85,121 @@ const char* _kFileTransferStatusNames[] = { const std::map<int, const char*> _FileTransferStatus_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kFileTransferStatusValues, _kFileTransferStatusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); -FileTransferRequest::~FileTransferRequest() throw() { +FileTransferRequestModel::~FileTransferRequestModel() throw() { } -void FileTransferRequest::__set_transferId(const std::string& val) { +void FileTransferRequestModel::__set_transferId(const std::string& val) { this->transferId = val; __isset.transferId = true; } -void FileTransferRequest::__set_srcHostname(const std::string& val) { +void FileTransferRequestModel::__set_gatewayId(const std::string& val) { + this->gatewayId = val; +__isset.gatewayId = true; +} + +void FileTransferRequestModel::__set_username(const std::string& val) { + this->username = val; +__isset.username = true; +} + +void FileTransferRequestModel::__set_srcHostname(const std::string& val) { this->srcHostname = val; __isset.srcHostname = true; } -void FileTransferRequest::__set_srcLoginName(const std::string& val) { +void FileTransferRequestModel::__set_srcLoginName(const std::string& val) { this->srcLoginName = val; __isset.srcLoginName = true; } -void FileTransferRequest::__set_srcPort(const int64_t val) { +void FileTransferRequestModel::__set_srcPort(const int64_t val) { this->srcPort = val; __isset.srcPort = true; } -void FileTransferRequest::__set_srcProtocol(const StorageResourceProtocol::type val) { +void FileTransferRequestModel::__set_srcProtocol(const StorageResourceProtocol::type val) { this->srcProtocol = val; __isset.srcProtocol = true; } -void FileTransferRequest::__set_srcFilePath(const std::string& val) { +void FileTransferRequestModel::__set_srcFilePath(const std::string& val) { this->srcFilePath = val; __isset.srcFilePath = true; } -void FileTransferRequest::__set_srcHostCredToken(const std::string& val) { +void FileTransferRequestModel::__set_srcHostCredToken(const std::string& val) { this->srcHostCredToken = val; __isset.srcHostCredToken = true; } -void FileTransferRequest::__set_destHostname(const std::string& val) { +void FileTransferRequestModel::__set_destHostname(const std::string& val) { this->destHostname = val; __isset.destHostname = true; } -void FileTransferRequest::__set_destLoginName(const std::string& val) { +void FileTransferRequestModel::__set_destLoginName(const std::string& val) { this->destLoginName = val; __isset.destLoginName = true; } -void FileTransferRequest::__set_destPort(const int64_t val) { +void FileTransferRequestModel::__set_destPort(const int64_t val) { this->destPort = val; __isset.destPort = true; } -void FileTransferRequest::__set_destProtocol(const StorageResourceProtocol::type val) { +void FileTransferRequestModel::__set_destProtocol(const StorageResourceProtocol::type val) { this->destProtocol = val; __isset.destProtocol = true; } -void FileTransferRequest::__set_destFilePath(const std::string& val) { +void FileTransferRequestModel::__set_destFilePath(const std::string& val) { this->destFilePath = val; __isset.destFilePath = true; } -void FileTransferRequest::__set_destHostCredToken(const std::string& val) { +void FileTransferRequestModel::__set_destHostCredToken(const std::string& val) { this->destHostCredToken = val; __isset.destHostCredToken = true; } -void FileTransferRequest::__set_fileTransferMode(const FileTransferMode::type val) { +void FileTransferRequestModel::__set_fileTransferMode(const FileTransferMode::type val) { this->fileTransferMode = val; __isset.fileTransferMode = true; } -void FileTransferRequest::__set_transferStatus(const FileTransferStatus::type val) { +void FileTransferRequestModel::__set_transferStatus(const FileTransferStatus::type val) { this->transferStatus = val; __isset.transferStatus = true; } -void FileTransferRequest::__set_fileSize(const int64_t val) { +void FileTransferRequestModel::__set_fileSize(const int64_t val) { this->fileSize = val; __isset.fileSize = true; } -void FileTransferRequest::__set_transferTime(const int64_t val) { +void FileTransferRequestModel::__set_transferTime(const int64_t val) { this->transferTime = val; __isset.transferTime = true; } -void FileTransferRequest::__set_createdTime(const int64_t val) { +void FileTransferRequestModel::__set_createdTime(const int64_t val) { this->createdTime = val; __isset.createdTime = true; } -void FileTransferRequest::__set_lastModifiedType(const int64_t val) { +void FileTransferRequestModel::__set_lastModifiedType(const int64_t val) { this->lastModifiedType = val; __isset.lastModifiedType = true; } -uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) { +void FileTransferRequestModel::__set_callbackEmails(const std::vector<std::string> & val) { + this->callbackEmails = val; +__isset.callbackEmails = true; +} + +uint32_t FileTransferRequestModel::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; @@ -215,13 +230,29 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) break; case 2: if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->gatewayId); + this->__isset.gatewayId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->username); + this->__isset.username = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->srcHostname); this->__isset.srcHostname = true; } else { xfer += iprot->skip(ftype); } break; - case 3: + case 5: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->srcLoginName); this->__isset.srcLoginName = true; @@ -229,7 +260,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 4: + case 6: if (ftype == ::apache::thrift::protocol::T_I64) { xfer += iprot->readI64(this->srcPort); this->__isset.srcPort = true; @@ -237,7 +268,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 5: + case 7: if (ftype == ::apache::thrift::protocol::T_I32) { int32_t ecast0; xfer += iprot->readI32(ecast0); @@ -247,7 +278,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 6: + case 8: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->srcFilePath); this->__isset.srcFilePath = true; @@ -255,7 +286,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 7: + case 9: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->srcHostCredToken); this->__isset.srcHostCredToken = true; @@ -263,7 +294,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 8: + case 10: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->destHostname); this->__isset.destHostname = true; @@ -271,7 +302,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 9: + case 11: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->destLoginName); this->__isset.destLoginName = true; @@ -279,7 +310,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 10: + case 12: if (ftype == ::apache::thrift::protocol::T_I64) { xfer += iprot->readI64(this->destPort); this->__isset.destPort = true; @@ -287,7 +318,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 11: + case 13: if (ftype == ::apache::thrift::protocol::T_I32) { int32_t ecast1; xfer += iprot->readI32(ecast1); @@ -297,7 +328,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 12: + case 14: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->destFilePath); this->__isset.destFilePath = true; @@ -305,7 +336,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 13: + case 15: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->destHostCredToken); this->__isset.destHostCredToken = true; @@ -313,7 +344,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 14: + case 16: if (ftype == ::apache::thrift::protocol::T_I32) { int32_t ecast2; xfer += iprot->readI32(ecast2); @@ -323,7 +354,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 15: + case 17: if (ftype == ::apache::thrift::protocol::T_I32) { int32_t ecast3; xfer += iprot->readI32(ecast3); @@ -333,7 +364,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 16: + case 18: if (ftype == ::apache::thrift::protocol::T_I64) { xfer += iprot->readI64(this->fileSize); this->__isset.fileSize = true; @@ -341,7 +372,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 17: + case 19: if (ftype == ::apache::thrift::protocol::T_I64) { xfer += iprot->readI64(this->transferTime); this->__isset.transferTime = true; @@ -349,7 +380,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 18: + case 20: if (ftype == ::apache::thrift::protocol::T_I64) { xfer += iprot->readI64(this->createdTime); this->__isset.createdTime = true; @@ -357,7 +388,7 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 19: + case 21: if (ftype == ::apache::thrift::protocol::T_I64) { xfer += iprot->readI64(this->lastModifiedType); this->__isset.lastModifiedType = true; @@ -365,6 +396,26 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; + case 22: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->callbackEmails.clear(); + uint32_t _size4; + ::apache::thrift::protocol::TType _etype7; + xfer += iprot->readListBegin(_etype7, _size4); + this->callbackEmails.resize(_size4); + uint32_t _i8; + for (_i8 = 0; _i8 < _size4; ++_i8) + { + xfer += iprot->readString(this->callbackEmails[_i8]); + } + xfer += iprot->readListEnd(); + } + this->__isset.callbackEmails = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -377,114 +428,139 @@ uint32_t FileTransferRequest::read(::apache::thrift::protocol::TProtocol* iprot) return xfer; } -uint32_t FileTransferRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t FileTransferRequestModel::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("FileTransferRequest"); + xfer += oprot->writeStructBegin("FileTransferRequestModel"); if (this->__isset.transferId) { xfer += oprot->writeFieldBegin("transferId", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->transferId); xfer += oprot->writeFieldEnd(); } + if (this->__isset.gatewayId) { + xfer += oprot->writeFieldBegin("gatewayId", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->gatewayId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.username) { + xfer += oprot->writeFieldBegin("username", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->username); + xfer += oprot->writeFieldEnd(); + } if (this->__isset.srcHostname) { - xfer += oprot->writeFieldBegin("srcHostname", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("srcHostname", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->srcHostname); xfer += oprot->writeFieldEnd(); } if (this->__isset.srcLoginName) { - xfer += oprot->writeFieldBegin("srcLoginName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("srcLoginName", ::apache::thrift::protocol::T_STRING, 5); xfer += oprot->writeString(this->srcLoginName); xfer += oprot->writeFieldEnd(); } if (this->__isset.srcPort) { - xfer += oprot->writeFieldBegin("srcPort", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeFieldBegin("srcPort", ::apache::thrift::protocol::T_I64, 6); xfer += oprot->writeI64(this->srcPort); xfer += oprot->writeFieldEnd(); } if (this->__isset.srcProtocol) { - xfer += oprot->writeFieldBegin("srcProtocol", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeFieldBegin("srcProtocol", ::apache::thrift::protocol::T_I32, 7); xfer += oprot->writeI32((int32_t)this->srcProtocol); xfer += oprot->writeFieldEnd(); } if (this->__isset.srcFilePath) { - xfer += oprot->writeFieldBegin("srcFilePath", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeFieldBegin("srcFilePath", ::apache::thrift::protocol::T_STRING, 8); xfer += oprot->writeString(this->srcFilePath); xfer += oprot->writeFieldEnd(); } if (this->__isset.srcHostCredToken) { - xfer += oprot->writeFieldBegin("srcHostCredToken", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeFieldBegin("srcHostCredToken", ::apache::thrift::protocol::T_STRING, 9); xfer += oprot->writeString(this->srcHostCredToken); xfer += oprot->writeFieldEnd(); } if (this->__isset.destHostname) { - xfer += oprot->writeFieldBegin("destHostname", ::apache::thrift::protocol::T_STRING, 8); + xfer += oprot->writeFieldBegin("destHostname", ::apache::thrift::protocol::T_STRING, 10); xfer += oprot->writeString(this->destHostname); xfer += oprot->writeFieldEnd(); } if (this->__isset.destLoginName) { - xfer += oprot->writeFieldBegin("destLoginName", ::apache::thrift::protocol::T_STRING, 9); + xfer += oprot->writeFieldBegin("destLoginName", ::apache::thrift::protocol::T_STRING, 11); xfer += oprot->writeString(this->destLoginName); xfer += oprot->writeFieldEnd(); } if (this->__isset.destPort) { - xfer += oprot->writeFieldBegin("destPort", ::apache::thrift::protocol::T_I64, 10); + xfer += oprot->writeFieldBegin("destPort", ::apache::thrift::protocol::T_I64, 12); xfer += oprot->writeI64(this->destPort); xfer += oprot->writeFieldEnd(); } if (this->__isset.destProtocol) { - xfer += oprot->writeFieldBegin("destProtocol", ::apache::thrift::protocol::T_I32, 11); + xfer += oprot->writeFieldBegin("destProtocol", ::apache::thrift::protocol::T_I32, 13); xfer += oprot->writeI32((int32_t)this->destProtocol); xfer += oprot->writeFieldEnd(); } if (this->__isset.destFilePath) { - xfer += oprot->writeFieldBegin("destFilePath", ::apache::thrift::protocol::T_STRING, 12); + xfer += oprot->writeFieldBegin("destFilePath", ::apache::thrift::protocol::T_STRING, 14); xfer += oprot->writeString(this->destFilePath); xfer += oprot->writeFieldEnd(); } if (this->__isset.destHostCredToken) { - xfer += oprot->writeFieldBegin("destHostCredToken", ::apache::thrift::protocol::T_STRING, 13); + xfer += oprot->writeFieldBegin("destHostCredToken", ::apache::thrift::protocol::T_STRING, 15); xfer += oprot->writeString(this->destHostCredToken); xfer += oprot->writeFieldEnd(); } if (this->__isset.fileTransferMode) { - xfer += oprot->writeFieldBegin("fileTransferMode", ::apache::thrift::protocol::T_I32, 14); + xfer += oprot->writeFieldBegin("fileTransferMode", ::apache::thrift::protocol::T_I32, 16); xfer += oprot->writeI32((int32_t)this->fileTransferMode); xfer += oprot->writeFieldEnd(); } if (this->__isset.transferStatus) { - xfer += oprot->writeFieldBegin("transferStatus", ::apache::thrift::protocol::T_I32, 15); + xfer += oprot->writeFieldBegin("transferStatus", ::apache::thrift::protocol::T_I32, 17); xfer += oprot->writeI32((int32_t)this->transferStatus); xfer += oprot->writeFieldEnd(); } if (this->__isset.fileSize) { - xfer += oprot->writeFieldBegin("fileSize", ::apache::thrift::protocol::T_I64, 16); + xfer += oprot->writeFieldBegin("fileSize", ::apache::thrift::protocol::T_I64, 18); xfer += oprot->writeI64(this->fileSize); xfer += oprot->writeFieldEnd(); } if (this->__isset.transferTime) { - xfer += oprot->writeFieldBegin("transferTime", ::apache::thrift::protocol::T_I64, 17); + xfer += oprot->writeFieldBegin("transferTime", ::apache::thrift::protocol::T_I64, 19); xfer += oprot->writeI64(this->transferTime); xfer += oprot->writeFieldEnd(); } if (this->__isset.createdTime) { - xfer += oprot->writeFieldBegin("createdTime", ::apache::thrift::protocol::T_I64, 18); + xfer += oprot->writeFieldBegin("createdTime", ::apache::thrift::protocol::T_I64, 20); xfer += oprot->writeI64(this->createdTime); xfer += oprot->writeFieldEnd(); } if (this->__isset.lastModifiedType) { - xfer += oprot->writeFieldBegin("lastModifiedType", ::apache::thrift::protocol::T_I64, 19); + xfer += oprot->writeFieldBegin("lastModifiedType", ::apache::thrift::protocol::T_I64, 21); xfer += oprot->writeI64(this->lastModifiedType); xfer += oprot->writeFieldEnd(); } + if (this->__isset.callbackEmails) { + xfer += oprot->writeFieldBegin("callbackEmails", ::apache::thrift::protocol::T_LIST, 22); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->callbackEmails.size())); + std::vector<std::string> ::const_iterator _iter9; + for (_iter9 = this->callbackEmails.begin(); _iter9 != this->callbackEmails.end(); ++_iter9) + { + xfer += oprot->writeString((*_iter9)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -void swap(FileTransferRequest &a, FileTransferRequest &b) { +void swap(FileTransferRequestModel &a, FileTransferRequestModel &b) { using ::std::swap; swap(a.transferId, b.transferId); + swap(a.gatewayId, b.gatewayId); + swap(a.username, b.username); swap(a.srcHostname, b.srcHostname); swap(a.srcLoginName, b.srcLoginName); swap(a.srcPort, b.srcPort); @@ -503,58 +579,67 @@ void swap(FileTransferRequest &a, FileTransferRequest &b) { swap(a.transferTime, b.transferTime); swap(a.createdTime, b.createdTime); swap(a.lastModifiedType, b.lastModifiedType); + swap(a.callbackEmails, b.callbackEmails); swap(a.__isset, b.__isset); } -FileTransferRequest::FileTransferRequest(const FileTransferRequest& other4) { - transferId = other4.transferId; - srcHostname = other4.srcHostname; - srcLoginName = other4.srcLoginName; - srcPort = other4.srcPort; - srcProtocol = other4.srcProtocol; - srcFilePath = other4.srcFilePath; - srcHostCredToken = other4.srcHostCredToken; - destHostname = other4.destHostname; - destLoginName = other4.destLoginName; - destPort = other4.destPort; - destProtocol = other4.destProtocol; - destFilePath = other4.destFilePath; - destHostCredToken = other4.destHostCredToken; - fileTransferMode = other4.fileTransferMode; - transferStatus = other4.transferStatus; - fileSize = other4.fileSize; - transferTime = other4.transferTime; - createdTime = other4.createdTime; - lastModifiedType = other4.lastModifiedType; - __isset = other4.__isset; -} -FileTransferRequest& FileTransferRequest::operator=(const FileTransferRequest& other5) { - transferId = other5.transferId; - srcHostname = other5.srcHostname; - srcLoginName = other5.srcLoginName; - srcPort = other5.srcPort; - srcProtocol = other5.srcProtocol; - srcFilePath = other5.srcFilePath; - srcHostCredToken = other5.srcHostCredToken; - destHostname = other5.destHostname; - destLoginName = other5.destLoginName; - destPort = other5.destPort; - destProtocol = other5.destProtocol; - destFilePath = other5.destFilePath; - destHostCredToken = other5.destHostCredToken; - fileTransferMode = other5.fileTransferMode; - transferStatus = other5.transferStatus; - fileSize = other5.fileSize; - transferTime = other5.transferTime; - createdTime = other5.createdTime; - lastModifiedType = other5.lastModifiedType; - __isset = other5.__isset; +FileTransferRequestModel::FileTransferRequestModel(const FileTransferRequestModel& other10) { + transferId = other10.transferId; + gatewayId = other10.gatewayId; + username = other10.username; + srcHostname = other10.srcHostname; + srcLoginName = other10.srcLoginName; + srcPort = other10.srcPort; + srcProtocol = other10.srcProtocol; + srcFilePath = other10.srcFilePath; + srcHostCredToken = other10.srcHostCredToken; + destHostname = other10.destHostname; + destLoginName = other10.destLoginName; + destPort = other10.destPort; + destProtocol = other10.destProtocol; + destFilePath = other10.destFilePath; + destHostCredToken = other10.destHostCredToken; + fileTransferMode = other10.fileTransferMode; + transferStatus = other10.transferStatus; + fileSize = other10.fileSize; + transferTime = other10.transferTime; + createdTime = other10.createdTime; + lastModifiedType = other10.lastModifiedType; + callbackEmails = other10.callbackEmails; + __isset = other10.__isset; +} +FileTransferRequestModel& FileTransferRequestModel::operator=(const FileTransferRequestModel& other11) { + transferId = other11.transferId; + gatewayId = other11.gatewayId; + username = other11.username; + srcHostname = other11.srcHostname; + srcLoginName = other11.srcLoginName; + srcPort = other11.srcPort; + srcProtocol = other11.srcProtocol; + srcFilePath = other11.srcFilePath; + srcHostCredToken = other11.srcHostCredToken; + destHostname = other11.destHostname; + destLoginName = other11.destLoginName; + destPort = other11.destPort; + destProtocol = other11.destProtocol; + destFilePath = other11.destFilePath; + destHostCredToken = other11.destHostCredToken; + fileTransferMode = other11.fileTransferMode; + transferStatus = other11.transferStatus; + fileSize = other11.fileSize; + transferTime = other11.transferTime; + createdTime = other11.createdTime; + lastModifiedType = other11.lastModifiedType; + callbackEmails = other11.callbackEmails; + __isset = other11.__isset; return *this; } -void FileTransferRequest::printTo(std::ostream& out) const { +void FileTransferRequestModel::printTo(std::ostream& out) const { using ::apache::thrift::to_string; - out << "FileTransferRequest("; + out << "FileTransferRequestModel("; out << "transferId="; (__isset.transferId ? (out << to_string(transferId)) : (out << "<null>")); + out << ", " << "gatewayId="; (__isset.gatewayId ? (out << to_string(gatewayId)) : (out << "<null>")); + out << ", " << "username="; (__isset.username ? (out << to_string(username)) : (out << "<null>")); out << ", " << "srcHostname="; (__isset.srcHostname ? (out << to_string(srcHostname)) : (out << "<null>")); out << ", " << "srcLoginName="; (__isset.srcLoginName ? (out << to_string(srcLoginName)) : (out << "<null>")); out << ", " << "srcPort="; (__isset.srcPort ? (out << to_string(srcPort)) : (out << "<null>")); @@ -573,55 +658,56 @@ void FileTransferRequest::printTo(std::ostream& out) const { out << ", " << "transferTime="; (__isset.transferTime ? (out << to_string(transferTime)) : (out << "<null>")); out << ", " << "createdTime="; (__isset.createdTime ? (out << to_string(createdTime)) : (out << "<null>")); out << ", " << "lastModifiedType="; (__isset.lastModifiedType ? (out << to_string(lastModifiedType)) : (out << "<null>")); + out << ", " << "callbackEmails="; (__isset.callbackEmails ? (out << to_string(callbackEmails)) : (out << "<null>")); out << ")"; } -FileNode::~FileNode() throw() { +LSEntryModel::~LSEntryModel() throw() { } -void FileNode::__set_type(const FileNodeTypes::type val) { +void LSEntryModel::__set_type(const LSEntryType::type val) { this->type = val; __isset.type = true; } -void FileNode::__set_size(const int64_t val) { +void LSEntryModel::__set_size(const int64_t val) { this->size = val; __isset.size = true; } -void FileNode::__set_nativeType(const std::string& val) { +void LSEntryModel::__set_nativeType(const std::string& val) { this->nativeType = val; __isset.nativeType = true; } -void FileNode::__set_name(const std::string& val) { +void LSEntryModel::__set_name(const std::string& val) { this->name = val; __isset.name = true; } -void FileNode::__set_path(const std::string& val) { +void LSEntryModel::__set_path(const std::string& val) { this->path = val; __isset.path = true; } -void FileNode::__set_storageHostName(const std::string& val) { +void LSEntryModel::__set_storageHostName(const std::string& val) { this->storageHostName = val; __isset.storageHostName = true; } -void FileNode::__set_lastModifiedType(const int64_t val) { +void LSEntryModel::__set_lastModifiedType(const int64_t val) { this->lastModifiedType = val; __isset.lastModifiedType = true; } -void FileNode::__set_createdTime(const int64_t val) { +void LSEntryModel::__set_createdTime(const int64_t val) { this->createdTime = val; __isset.createdTime = true; } -uint32_t FileNode::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t LSEntryModel::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; @@ -644,9 +730,9 @@ uint32_t FileNode::read(::apache::thrift::protocol::TProtocol* iprot) { { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast6; - xfer += iprot->readI32(ecast6); - this->type = (FileNodeTypes::type)ecast6; + int32_t ecast12; + xfer += iprot->readI32(ecast12); + this->type = (LSEntryType::type)ecast12; this->__isset.type = true; } else { xfer += iprot->skip(ftype); @@ -720,10 +806,10 @@ uint32_t FileNode::read(::apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t FileNode::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t LSEntryModel::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("FileNode"); + xfer += oprot->writeStructBegin("LSEntryModel"); if (this->__isset.type) { xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1); @@ -770,7 +856,7 @@ uint32_t FileNode::write(::apache::thrift::protocol::TProtocol* oprot) const { return xfer; } -void swap(FileNode &a, FileNode &b) { +void swap(LSEntryModel &a, LSEntryModel &b) { using ::std::swap; swap(a.type, b.type); swap(a.size, b.size); @@ -783,32 +869,32 @@ void swap(FileNode &a, FileNode &b) { swap(a.__isset, b.__isset); } -FileNode::FileNode(const FileNode& other7) { - type = other7.type; - size = other7.size; - nativeType = other7.nativeType; - name = other7.name; - path = other7.path; - storageHostName = other7.storageHostName; - lastModifiedType = other7.lastModifiedType; - createdTime = other7.createdTime; - __isset = other7.__isset; -} -FileNode& FileNode::operator=(const FileNode& other8) { - type = other8.type; - size = other8.size; - nativeType = other8.nativeType; - name = other8.name; - path = other8.path; - storageHostName = other8.storageHostName; - lastModifiedType = other8.lastModifiedType; - createdTime = other8.createdTime; - __isset = other8.__isset; +LSEntryModel::LSEntryModel(const LSEntryModel& other13) { + type = other13.type; + size = other13.size; + nativeType = other13.nativeType; + name = other13.name; + path = other13.path; + storageHostName = other13.storageHostName; + lastModifiedType = other13.lastModifiedType; + createdTime = other13.createdTime; + __isset = other13.__isset; +} +LSEntryModel& LSEntryModel::operator=(const LSEntryModel& other14) { + type = other14.type; + size = other14.size; + nativeType = other14.nativeType; + name = other14.name; + path = other14.path; + storageHostName = other14.storageHostName; + lastModifiedType = other14.lastModifiedType; + createdTime = other14.createdTime; + __isset = other14.__isset; return *this; } -void FileNode::printTo(std::ostream& out) const { +void LSEntryModel::printTo(std::ostream& out) const { using ::apache::thrift::to_string; - out << "FileNode("; + out << "LSEntryModel("; out << "type="; (__isset.type ? (out << to_string(type)) : (out << "<null>")); out << ", " << "size="; (__isset.size ? (out << to_string(size)) : (out << "<null>")); out << ", " << "nativeType="; (__isset.nativeType ? (out << to_string(nativeType)) : (out << "<null>")); @@ -820,4 +906,4 @@ void FileNode::printTo(std::ostream& out) const { out << ")"; } -}}}} // namespace +}}}}} // namespace http://git-wip-us.apache.org/repos/asf/airavata/blob/b61cfcd3/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_types.h index 0ea49e6..18f1b8b 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_types.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/file__transfer_models_types.h @@ -34,7 +34,7 @@ #include <thrift/cxxfunctional.h> -namespace apache { namespace airavata { namespace model { namespace file { +namespace apache { namespace airavata { namespace model { namespace file { namespace transfer { struct StorageResourceProtocol { enum type { @@ -49,14 +49,14 @@ struct StorageResourceProtocol { extern const std::map<int, const char*> _StorageResourceProtocol_VALUES_TO_NAMES; -struct FileNodeTypes { +struct LSEntryType { enum type { DIRECTORY = 0, FILE = 1 }; }; -extern const std::map<int, const char*> _FileNodeTypes_VALUES_TO_NAMES; +extern const std::map<int, const char*> _LSEntryType_VALUES_TO_NAMES; struct FileTransferMode { enum type { @@ -79,13 +79,15 @@ struct FileTransferStatus { extern const std::map<int, const char*> _FileTransferStatus_VALUES_TO_NAMES; -class FileTransferRequest; +class FileTransferRequestModel; -class FileNode; +class LSEntryModel; -typedef struct _FileTransferRequest__isset { - _FileTransferRequest__isset() : transferId(false), srcHostname(false), srcLoginName(false), srcPort(false), srcProtocol(false), srcFilePath(false), srcHostCredToken(false), destHostname(false), destLoginName(false), destPort(false), destProtocol(false), destFilePath(false), destHostCredToken(false), fileTransferMode(false), transferStatus(false), fileSize(false), transferTime(false), createdTime(false), lastModifiedType(false) {} +typedef struct _FileTransferRequestModel__isset { + _FileTransferRequestModel__isset() : transferId(false), gatewayId(false), username(false), srcHostname(false), srcLoginName(false), srcPort(false), srcProtocol(false), srcFilePath(false), srcHostCredToken(false), destHostname(false), destLoginName(false), destPort(false), destProtocol(false), destFilePath(false), destHostCredToken(false), fileTransferMode(false), transferStatus(false), fileSize(false), transferTime(false), createdTime(false), lastModifiedType(false), callbackEmails(false) {} bool transferId :1; + bool gatewayId :1; + bool username :1; bool srcHostname :1; bool srcLoginName :1; bool srcPort :1; @@ -104,18 +106,21 @@ typedef struct _FileTransferRequest__isset { bool transferTime :1; bool createdTime :1; bool lastModifiedType :1; -} _FileTransferRequest__isset; + bool callbackEmails :1; +} _FileTransferRequestModel__isset; -class FileTransferRequest { +class FileTransferRequestModel { public: - FileTransferRequest(const FileTransferRequest&); - FileTransferRequest& operator=(const FileTransferRequest&); - FileTransferRequest() : transferId(), srcHostname(), srcLoginName(), srcPort(0), srcProtocol((StorageResourceProtocol::type)0), srcFilePath(), srcHostCredToken(), destHostname(), destLoginName(), destPort(0), destProtocol((StorageResourceProtocol::type)0), destFilePath(), destHostCredToken(), fileTransferMode((FileTransferMode::type)0), transferStatus((FileTransferStatus::type)0), fileSize(0), transferTime(0), createdTime(0), lastModifiedType(0) { + FileTransferRequestModel(const FileTransferRequestModel&); + FileTransferRequestModel& operator=(const FileTransferRequestModel&); + FileTransferRequestModel() : transferId(), gatewayId(), username(), srcHostname(), srcLoginName(), srcPort(0), srcProtocol((StorageResourceProtocol::type)0), srcFilePath(), srcHostCredToken(), destHostname(), destLoginName(), destPort(0), destProtocol((StorageResourceProtocol::type)0), destFilePath(), destHostCredToken(), fileTransferMode((FileTransferMode::type)0), transferStatus((FileTransferStatus::type)0), fileSize(0), transferTime(0), createdTime(0), lastModifiedType(0) { } - virtual ~FileTransferRequest() throw(); + virtual ~FileTransferRequestModel() throw(); std::string transferId; + std::string gatewayId; + std::string username; std::string srcHostname; std::string srcLoginName; int64_t srcPort; @@ -134,11 +139,16 @@ class FileTransferRequest { int64_t transferTime; int64_t createdTime; int64_t lastModifiedType; + std::vector<std::string> callbackEmails; - _FileTransferRequest__isset __isset; + _FileTransferRequestModel__isset __isset; void __set_transferId(const std::string& val); + void __set_gatewayId(const std::string& val); + + void __set_username(const std::string& val); + void __set_srcHostname(const std::string& val); void __set_srcLoginName(const std::string& val); @@ -175,12 +185,22 @@ class FileTransferRequest { void __set_lastModifiedType(const int64_t val); - bool operator == (const FileTransferRequest & rhs) const + void __set_callbackEmails(const std::vector<std::string> & val); + + bool operator == (const FileTransferRequestModel & rhs) const { if (__isset.transferId != rhs.__isset.transferId) return false; else if (__isset.transferId && !(transferId == rhs.transferId)) return false; + if (__isset.gatewayId != rhs.__isset.gatewayId) + return false; + else if (__isset.gatewayId && !(gatewayId == rhs.gatewayId)) + return false; + if (__isset.username != rhs.__isset.username) + return false; + else if (__isset.username && !(username == rhs.username)) + return false; if (__isset.srcHostname != rhs.__isset.srcHostname) return false; else if (__isset.srcHostname && !(srcHostname == rhs.srcHostname)) @@ -253,13 +273,17 @@ class FileTransferRequest { return false; else if (__isset.lastModifiedType && !(lastModifiedType == rhs.lastModifiedType)) return false; + if (__isset.callbackEmails != rhs.__isset.callbackEmails) + return false; + else if (__isset.callbackEmails && !(callbackEmails == rhs.callbackEmails)) + return false; return true; } - bool operator != (const FileTransferRequest &rhs) const { + bool operator != (const FileTransferRequestModel &rhs) const { return !(*this == rhs); } - bool operator < (const FileTransferRequest & ) const; + bool operator < (const FileTransferRequestModel & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -267,16 +291,16 @@ class FileTransferRequest { virtual void printTo(std::ostream& out) const; }; -void swap(FileTransferRequest &a, FileTransferRequest &b); +void swap(FileTransferRequestModel &a, FileTransferRequestModel &b); -inline std::ostream& operator<<(std::ostream& out, const FileTransferRequest& obj) +inline std::ostream& operator<<(std::ostream& out, const FileTransferRequestModel& obj) { obj.printTo(out); return out; } -typedef struct _FileNode__isset { - _FileNode__isset() : type(false), size(false), nativeType(false), name(false), path(false), storageHostName(false), lastModifiedType(false), createdTime(false) {} +typedef struct _LSEntryModel__isset { + _LSEntryModel__isset() : type(false), size(false), nativeType(false), name(false), path(false), storageHostName(false), lastModifiedType(false), createdTime(false) {} bool type :1; bool size :1; bool nativeType :1; @@ -285,18 +309,18 @@ typedef struct _FileNode__isset { bool storageHostName :1; bool lastModifiedType :1; bool createdTime :1; -} _FileNode__isset; +} _LSEntryModel__isset; -class FileNode { +class LSEntryModel { public: - FileNode(const FileNode&); - FileNode& operator=(const FileNode&); - FileNode() : type((FileNodeTypes::type)0), size(0), nativeType(), name(), path(), storageHostName(), lastModifiedType(0), createdTime(0) { + LSEntryModel(const LSEntryModel&); + LSEntryModel& operator=(const LSEntryModel&); + LSEntryModel() : type((LSEntryType::type)0), size(0), nativeType(), name(), path(), storageHostName(), lastModifiedType(0), createdTime(0) { } - virtual ~FileNode() throw(); - FileNodeTypes::type type; + virtual ~LSEntryModel() throw(); + LSEntryType::type type; int64_t size; std::string nativeType; std::string name; @@ -305,9 +329,9 @@ class FileNode { int64_t lastModifiedType; int64_t createdTime; - _FileNode__isset __isset; + _LSEntryModel__isset __isset; - void __set_type(const FileNodeTypes::type val); + void __set_type(const LSEntryType::type val); void __set_size(const int64_t val); @@ -323,7 +347,7 @@ class FileNode { void __set_createdTime(const int64_t val); - bool operator == (const FileNode & rhs) const + bool operator == (const LSEntryModel & rhs) const { if (__isset.type != rhs.__isset.type) return false; @@ -359,11 +383,11 @@ class FileNode { return false; return true; } - bool operator != (const FileNode &rhs) const { + bool operator != (const LSEntryModel &rhs) const { return !(*this == rhs); } - bool operator < (const FileNode & ) const; + bool operator < (const LSEntryModel & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -371,14 +395,14 @@ class FileNode { virtual void printTo(std::ostream& out) const; }; -void swap(FileNode &a, FileNode &b); +void swap(LSEntryModel &a, LSEntryModel &b); -inline std::ostream& operator<<(std::ostream& out, const FileNode& obj) +inline std::ostream& operator<<(std::ostream& out, const LSEntryModel& obj) { obj.printTo(out); return out; } -}}}} // namespace +}}}}} // namespace #endif http://git-wip-us.apache.org/repos/asf/airavata/blob/b61cfcd3/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_constants.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_constants.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_constants.cpp new file mode 100644 index 0000000..b067323 --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_constants.cpp @@ -0,0 +1,34 @@ +/** + * 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. + */ + +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "metadata_models_constants.h" + +namespace apache { namespace airavata { namespace model { namespace file { namespace metadata { + +const metadata_modelsConstants g_metadata_models_constants; + +metadata_modelsConstants::metadata_modelsConstants() { +} + +}}}}} // namespace + http://git-wip-us.apache.org/repos/asf/airavata/blob/b61cfcd3/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_constants.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_constants.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_constants.h new file mode 100644 index 0000000..a43c422 --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_constants.h @@ -0,0 +1,41 @@ +/** + * 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. + */ + +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef metadata_models_CONSTANTS_H +#define metadata_models_CONSTANTS_H + +#include "metadata_models_types.h" + +namespace apache { namespace airavata { namespace model { namespace file { namespace metadata { + +class metadata_modelsConstants { + public: + metadata_modelsConstants(); + +}; + +extern const metadata_modelsConstants g_metadata_models_constants; + +}}}}} // namespace + +#endif http://git-wip-us.apache.org/repos/asf/airavata/blob/b61cfcd3/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.cpp new file mode 100644 index 0000000..fdf959e --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/metadata_models_types.cpp @@ -0,0 +1,375 @@ +/** + * 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. + */ + +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "metadata_models_types.h" + +#include <algorithm> +#include <ostream> + +#include <thrift/TToString.h> + +namespace apache { namespace airavata { namespace model { namespace file { namespace metadata { + +int _kMetadataTypeValues[] = { + MetadataType::FILE, + MetadataType::COLLECTION +}; +const char* _kMetadataTypeNames[] = { + "FILE", + "COLLECTION" +}; +const std::map<int, const char*> _MetadataType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kMetadataTypeValues, _kMetadataTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + + +MetadataModel::~MetadataModel() throw() { +} + + +void MetadataModel::__set_metadataId(const std::string& val) { + this->metadataId = val; +__isset.metadataId = true; +} + +void MetadataModel::__set_gatewayId(const std::string& val) { + this->gatewayId = val; +__isset.gatewayId = true; +} + +void MetadataModel::__set_username(const std::string& val) { + this->username = val; +__isset.username = true; +} + +void MetadataModel::__set_sharedUsers(const std::vector<std::string> & val) { + this->sharedUsers = val; +__isset.sharedUsers = true; +} + +void MetadataModel::__set_sharedPublic(const bool val) { + this->sharedPublic = val; +__isset.sharedPublic = true; +} + +void MetadataModel::__set_userFriendlyName(const std::string& val) { + this->userFriendlyName = val; +__isset.userFriendlyName = true; +} + +void MetadataModel::__set_userFriendlyDescription(const std::string& val) { + this->userFriendlyDescription = val; +__isset.userFriendlyDescription = true; +} + +void MetadataModel::__set_metadataType(const MetadataType::type val) { + this->metadataType = val; +__isset.metadataType = true; +} + +void MetadataModel::__set_associatedEntityId(const std::string& val) { + this->associatedEntityId = val; +__isset.associatedEntityId = true; +} + +void MetadataModel::__set_customInformation(const std::map<std::string, std::string> & val) { + this->customInformation = val; +__isset.customInformation = true; +} + +uint32_t MetadataModel::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->metadataId); + this->__isset.metadataId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->gatewayId); + this->__isset.gatewayId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->username); + this->__isset.username = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->sharedUsers.clear(); + uint32_t _size0; + ::apache::thrift::protocol::TType _etype3; + xfer += iprot->readListBegin(_etype3, _size0); + this->sharedUsers.resize(_size0); + uint32_t _i4; + for (_i4 = 0; _i4 < _size0; ++_i4) + { + xfer += iprot->readString(this->sharedUsers[_i4]); + } + xfer += iprot->readListEnd(); + } + this->__isset.sharedUsers = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->sharedPublic); + this->__isset.sharedPublic = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->userFriendlyName); + this->__isset.userFriendlyName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->userFriendlyDescription); + this->__isset.userFriendlyDescription = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast5; + xfer += iprot->readI32(ecast5); + this->metadataType = (MetadataType::type)ecast5; + this->__isset.metadataType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->associatedEntityId); + this->__isset.associatedEntityId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->customInformation.clear(); + uint32_t _size6; + ::apache::thrift::protocol::TType _ktype7; + ::apache::thrift::protocol::TType _vtype8; + xfer += iprot->readMapBegin(_ktype7, _vtype8, _size6); + uint32_t _i10; + for (_i10 = 0; _i10 < _size6; ++_i10) + { + std::string _key11; + xfer += iprot->readString(_key11); + std::string& _val12 = this->customInformation[_key11]; + xfer += iprot->readString(_val12); + } + xfer += iprot->readMapEnd(); + } + this->__isset.customInformation = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MetadataModel::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MetadataModel"); + + if (this->__isset.metadataId) { + xfer += oprot->writeFieldBegin("metadataId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->metadataId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.gatewayId) { + xfer += oprot->writeFieldBegin("gatewayId", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->gatewayId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.username) { + xfer += oprot->writeFieldBegin("username", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->username); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.sharedUsers) { + xfer += oprot->writeFieldBegin("sharedUsers", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->sharedUsers.size())); + std::vector<std::string> ::const_iterator _iter13; + for (_iter13 = this->sharedUsers.begin(); _iter13 != this->sharedUsers.end(); ++_iter13) + { + xfer += oprot->writeString((*_iter13)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.sharedPublic) { + xfer += oprot->writeFieldBegin("sharedPublic", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->sharedPublic); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.userFriendlyName) { + xfer += oprot->writeFieldBegin("userFriendlyName", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->userFriendlyName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.userFriendlyDescription) { + xfer += oprot->writeFieldBegin("userFriendlyDescription", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->userFriendlyDescription); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.metadataType) { + xfer += oprot->writeFieldBegin("metadataType", ::apache::thrift::protocol::T_I32, 8); + xfer += oprot->writeI32((int32_t)this->metadataType); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.associatedEntityId) { + xfer += oprot->writeFieldBegin("associatedEntityId", ::apache::thrift::protocol::T_STRING, 9); + xfer += oprot->writeString(this->associatedEntityId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.customInformation) { + xfer += oprot->writeFieldBegin("customInformation", ::apache::thrift::protocol::T_MAP, 10); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->customInformation.size())); + std::map<std::string, std::string> ::const_iterator _iter14; + for (_iter14 = this->customInformation.begin(); _iter14 != this->customInformation.end(); ++_iter14) + { + xfer += oprot->writeString(_iter14->first); + xfer += oprot->writeString(_iter14->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(MetadataModel &a, MetadataModel &b) { + using ::std::swap; + swap(a.metadataId, b.metadataId); + swap(a.gatewayId, b.gatewayId); + swap(a.username, b.username); + swap(a.sharedUsers, b.sharedUsers); + swap(a.sharedPublic, b.sharedPublic); + swap(a.userFriendlyName, b.userFriendlyName); + swap(a.userFriendlyDescription, b.userFriendlyDescription); + swap(a.metadataType, b.metadataType); + swap(a.associatedEntityId, b.associatedEntityId); + swap(a.customInformation, b.customInformation); + swap(a.__isset, b.__isset); +} + +MetadataModel::MetadataModel(const MetadataModel& other15) { + metadataId = other15.metadataId; + gatewayId = other15.gatewayId; + username = other15.username; + sharedUsers = other15.sharedUsers; + sharedPublic = other15.sharedPublic; + userFriendlyName = other15.userFriendlyName; + userFriendlyDescription = other15.userFriendlyDescription; + metadataType = other15.metadataType; + associatedEntityId = other15.associatedEntityId; + customInformation = other15.customInformation; + __isset = other15.__isset; +} +MetadataModel& MetadataModel::operator=(const MetadataModel& other16) { + metadataId = other16.metadataId; + gatewayId = other16.gatewayId; + username = other16.username; + sharedUsers = other16.sharedUsers; + sharedPublic = other16.sharedPublic; + userFriendlyName = other16.userFriendlyName; + userFriendlyDescription = other16.userFriendlyDescription; + metadataType = other16.metadataType; + associatedEntityId = other16.associatedEntityId; + customInformation = other16.customInformation; + __isset = other16.__isset; + return *this; +} +void MetadataModel::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "MetadataModel("; + out << "metadataId="; (__isset.metadataId ? (out << to_string(metadataId)) : (out << "<null>")); + out << ", " << "gatewayId="; (__isset.gatewayId ? (out << to_string(gatewayId)) : (out << "<null>")); + out << ", " << "username="; (__isset.username ? (out << to_string(username)) : (out << "<null>")); + out << ", " << "sharedUsers="; (__isset.sharedUsers ? (out << to_string(sharedUsers)) : (out << "<null>")); + out << ", " << "sharedPublic="; (__isset.sharedPublic ? (out << to_string(sharedPublic)) : (out << "<null>")); + out << ", " << "userFriendlyName="; (__isset.userFriendlyName ? (out << to_string(userFriendlyName)) : (out << "<null>")); + out << ", " << "userFriendlyDescription="; (__isset.userFriendlyDescription ? (out << to_string(userFriendlyDescription)) : (out << "<null>")); + out << ", " << "metadataType="; (__isset.metadataType ? (out << to_string(metadataType)) : (out << "<null>")); + out << ", " << "associatedEntityId="; (__isset.associatedEntityId ? (out << to_string(associatedEntityId)) : (out << "<null>")); + out << ", " << "customInformation="; (__isset.customInformation ? (out << to_string(customInformation)) : (out << "<null>")); + out << ")"; +} + +}}}}} // namespace
