Skip to content

Latest commit

 

History

History
382 lines (294 loc) · 20 KB

README.md

File metadata and controls

382 lines (294 loc) · 20 KB

Drives

(fileStorage().drives())

Overview

Available Operations

list

List Drives

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.DrivesFilter;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.FileStorageDrivesAllRequest;
import com.apideck.unify.models.operations.FileStorageDrivesAllResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        FileStorageDrivesAllRequest req = FileStorageDrivesAllRequest.builder()
                .serviceId("salesforce")
                .filter(DrivesFilter.builder()
                    .groupId("1234")
                    .build())
                .fields("id,updated_at")
                .build();

        FileStorageDrivesAllResponse res = sdk.fileStorage().drives().list()
                .request(req)
                .call();

        if (res.getDrivesResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request FileStorageDrivesAllRequest ✔️ The request object to use for the request.

Response

FileStorageDrivesAllResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*

create

Create Drive

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.DriveInput;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.FileStorageDrivesAddRequest;
import com.apideck.unify.models.operations.FileStorageDrivesAddResponse;
import java.lang.Exception;
import java.util.List;
import java.util.Map;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        FileStorageDrivesAddRequest req = FileStorageDrivesAddRequest.builder()
                .drive(DriveInput.builder()
                    .name("Project Resources")
                    .description("A description")
                    .passThrough(List.of(
                        PassThroughBody.builder()
                            .serviceId("<id>")
                            .extendPaths(List.of(
                                ExtendPaths.builder()
                                    .path("$.nested.property")
                                    .value(Map.ofEntries(\n    Map.entry("TaxClassificationRef", Map.ofEntries(\n    Map.entry("value", "EUC-99990201-V1-00020000")))))
                                    .build()))
                            .build()))
                    .build())
                .serviceId("salesforce")
                .build();

        FileStorageDrivesAddResponse res = sdk.fileStorage().drives().create()
                .request(req)
                .call();

        if (res.createDriveResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request FileStorageDrivesAddRequest ✔️ The request object to use for the request.

Response

FileStorageDrivesAddResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*

get

Get Drive

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.FileStorageDrivesOneRequest;
import com.apideck.unify.models.operations.FileStorageDrivesOneResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        FileStorageDrivesOneRequest req = FileStorageDrivesOneRequest.builder()
                .id("<id>")
                .serviceId("salesforce")
                .fields("id,updated_at")
                .build();

        FileStorageDrivesOneResponse res = sdk.fileStorage().drives().get()
                .request(req)
                .call();

        if (res.getDriveResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request FileStorageDrivesOneRequest ✔️ The request object to use for the request.

Response

FileStorageDrivesOneResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*

update

Update Drive

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.DriveInput;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.FileStorageDrivesUpdateRequest;
import com.apideck.unify.models.operations.FileStorageDrivesUpdateResponse;
import java.lang.Exception;
import java.util.List;
import java.util.Map;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        FileStorageDrivesUpdateRequest req = FileStorageDrivesUpdateRequest.builder()
                .id("<id>")
                .drive(DriveInput.builder()
                    .name("Project Resources")
                    .description("A description")
                    .passThrough(List.of(
                        PassThroughBody.builder()
                            .serviceId("<id>")
                            .extendPaths(List.of(
                                ExtendPaths.builder()
                                    .path("$.nested.property")
                                    .value(Map.ofEntries(\n    Map.entry("TaxClassificationRef", Map.ofEntries(\n    Map.entry("value", "EUC-99990201-V1-00020000")))))
                                    .build()))
                            .build()))
                    .build())
                .serviceId("salesforce")
                .build();

        FileStorageDrivesUpdateResponse res = sdk.fileStorage().drives().update()
                .request(req)
                .call();

        if (res.updateDriveResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request FileStorageDrivesUpdateRequest ✔️ The request object to use for the request.

Response

FileStorageDrivesUpdateResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*

delete

Delete Drive

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.FileStorageDrivesDeleteRequest;
import com.apideck.unify.models.operations.FileStorageDrivesDeleteResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        FileStorageDrivesDeleteRequest req = FileStorageDrivesDeleteRequest.builder()
                .id("<id>")
                .serviceId("salesforce")
                .build();

        FileStorageDrivesDeleteResponse res = sdk.fileStorage().drives().delete()
                .request(req)
                .call();

        if (res.deleteDriveResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request FileStorageDrivesDeleteRequest ✔️ The request object to use for the request.

Response

FileStorageDrivesDeleteResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*