blob: 48def08926217da67c8b87adbc1fce4fd9b56bea [file] [log] [blame]
/*
* 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.
*/
syntax = "proto3";
option java_multiple_files = true;
package org.apache.airavata.mft.resource.stubs.common;
import "azure/AzureStorage.proto";
import "box/BoxStorage.proto";
import "dropbox/DropboxStorage.proto";
import "ftp/FTPStorage.proto";
import "gcs/GCSStorage.proto";
import "local/LocalStorage.proto";
import "s3/S3Storage.proto";
import "scp/SCPStorage.proto";
import "swift/SwiftStorage.proto";
import "odata/ODataStorage.proto";
import "CredCommon.proto";
message FileResource {
string resourcePath = 1;
}
message DirectoryResource {
string resourcePath = 1;
}
message GenericResource {
string resourceId = 1;
oneof resource {
org.apache.airavata.mft.resource.stubs.common.FileResource file = 2;
org.apache.airavata.mft.resource.stubs.common.DirectoryResource directory = 3;
}
oneof storage {
org.apache.airavata.mft.resource.stubs.dropbox.storage.DropboxStorage dropboxStorage = 4;
org.apache.airavata.mft.resource.stubs.ftp.storage.FTPStorage ftpStorage = 5;
org.apache.airavata.mft.resource.stubs.gcs.storage.GCSStorage gcsStorage = 6;
org.apache.airavata.mft.resource.stubs.local.storage.LocalStorage localStorage = 7;
org.apache.airavata.mft.resource.stubs.s3.storage.S3Storage s3Storage = 8;
org.apache.airavata.mft.resource.stubs.scp.storage.SCPStorage scpStorage = 9;
org.apache.airavata.mft.resource.stubs.box.storage.BoxStorage boxStorage = 10;
org.apache.airavata.mft.resource.stubs.azure.storage.AzureStorage azureStorage = 11;
org.apache.airavata.mft.resource.stubs.swift.storage.SwiftStorage swiftStorage = 12;
org.apache.airavata.mft.resource.stubs.odata.storage.ODataStorage odataStorage = 13;
}
}
message GenericResourceGetRequest {
string resourceId = 1;
org.apache.airavata.mft.common.AuthToken authzToken = 2;
}
message GenericResourceCreateRequest {
string storageId = 1;
oneof resource {
org.apache.airavata.mft.resource.stubs.common.FileResource file = 2;
org.apache.airavata.mft.resource.stubs.common.DirectoryResource directory = 3;
}
org.apache.airavata.mft.common.AuthToken authzToken = 4;
enum StorageType {
S3 = 0;
SCP = 1;
FTP = 2;
LOCAL = 3;
BOX = 4;
DROPBOX = 5;
GCS = 6;
AZURE = 7;
SWIFT = 8;
ODATA = 9;
}
StorageType storageType = 5;
}
message GenericResourceUpdateRequest {
string resourceId = 1;
string storageId = 2;
oneof resource {
org.apache.airavata.mft.resource.stubs.common.FileResource file = 3;
org.apache.airavata.mft.resource.stubs.common.DirectoryResource directory = 4;
}
org.apache.airavata.mft.common.AuthToken authzToken = 5;
}
message GenericResourceUpdateResponse {
string resourceId = 1;
}
message GenericResourceDeleteRequest {
string resourceId = 1;
org.apache.airavata.mft.common.AuthToken authzToken = 2;
}
message GenericResourceDeleteResponse {
bool status = 1;
}
service GenericResourceService {
rpc getGenericResource (GenericResourceGetRequest) returns
(org.apache.airavata.mft.resource.stubs.common.GenericResource);
rpc createGenericResource (GenericResourceCreateRequest) returns
(org.apache.airavata.mft.resource.stubs.common.GenericResource);
rpc updateGenericResource (GenericResourceUpdateRequest) returns (GenericResourceUpdateResponse);
rpc deleteGenericResource (GenericResourceDeleteRequest) returns (GenericResourceDeleteResponse);
}