All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.smartsheet.api.SightResources Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
 * Copyright (C) 2023 Smartsheet
 *
 * Licensed 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 com.smartsheet.api;

import com.smartsheet.api.models.ContainerDestination;
import com.smartsheet.api.models.PagedResult;
import com.smartsheet.api.models.PaginationParameters;
import com.smartsheet.api.models.Sight;
import com.smartsheet.api.models.SightPublish;
import com.smartsheet.api.models.enums.SightInclusion;

import java.util.Date;
import java.util.EnumSet;

public interface SightResources {

    /**
     * 

Gets the list of all Sights where the User has access.

* *

It mirrors to the following Smartsheet REST API method: GET /sights

* * @param paging the pagination parameters * @param modifiedSince include sights modified on or after this date * @return IndexResult object containing an array of Sight objects limited to the following attributes: * id, name, accessLevel, permalink, createdAt, modifiedAt. * @throws IllegalArgumentException if any argument is null or empty string * @throws InvalidRequestException if there is any problem with the REST API request * @throws AuthorizationException if there is any problem with the REST API authorization (access token) * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) * @throws SmartsheetException if there is any other error during the operation */ PagedResult listSights(PaginationParameters paging, Date modifiedSince) throws SmartsheetException; /** *

Get a specified Sight.

* *

It mirrors to the following Smartsheet REST API method: GET /sights/{sightId}

* * @param sightId the Id of the Sight * @return the Sight resource. * @throws IllegalArgumentException if any argument is null or empty string * @throws InvalidRequestException if there is any problem with the REST API request * @throws AuthorizationException if there is any problem with the REST API authorization (access token) * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) * @throws SmartsheetException if there is any other error during the operation */ Sight getSight(long sightId) throws SmartsheetException; /** *

Get a specified Sight.

* *

It mirrors to the following Smartsheet REST API method: GET /sights/{sightId}

* * @param sightId the Id of the Sight * @param level compatibility level * @return the Sight resource. * @throws IllegalArgumentException if any argument is null or empty string * @throws InvalidRequestException if there is any problem with the REST API request * @throws AuthorizationException if there is any problem with the REST API authorization (access token) * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) * @throws SmartsheetException if there is any other error during the operation */ Sight getSight(long sightId, Integer level) throws SmartsheetException; /** *

Get a specified Sight.

* *

It mirrors to the following Smartsheet REST API method: GET /sights/{sightId}

* * @param sightId the Id of the Sight * @param level compatibility level * @return the Sight resource. * @throws IllegalArgumentException if any argument is null or empty string * @throws InvalidRequestException if there is any problem with the REST API request * @throws AuthorizationException if there is any problem with the REST API authorization (access token) * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) * @throws SmartsheetException if there is any other error during the operation */ Sight getSight(long sightId, EnumSet includes, Integer level) throws SmartsheetException; /** *

Get a specified Sight.

* *

It mirrors to the following Smartsheet REST API method: PUT /sights/{sightId}

* * @param sight - the Sight to update * @return the updated Sight resource. * @throws IllegalArgumentException if any argument is null or empty string * @throws InvalidRequestException if there is any problem with the REST API request * @throws AuthorizationException if there is any problem with the REST API authorization (access token) * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) * @throws SmartsheetException if there is any other error during the operation */ Sight updateSight(Sight sight) throws SmartsheetException; /** *

Delete a specified Sight.

* *

It mirrors to the following Smartsheet REST API method: DELETE /sights/{sightId}

* * @param sightId the Id of the Sight * @throws IllegalArgumentException if any argument is null or empty string * @throws InvalidRequestException if there is any problem with the REST API request * @throws AuthorizationException if there is any problem with the REST API authorization (access token) * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) * @throws SmartsheetException if there is any other error during the operation */ void deleteSight(long sightId) throws SmartsheetException; /** *

Creates s copy of the specified Sight.

* *

It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/copy

* * @param sightId the Id of the Sight * @param destination the destination to copy to * @return the newly created Sight resource. * @throws IllegalArgumentException if any argument is null or empty string * @throws InvalidRequestException if there is any problem with the REST API request * @throws AuthorizationException if there is any problem with the REST API authorization (access token) * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) * @throws SmartsheetException if there is any other error during the operation */ Sight copySight(long sightId, ContainerDestination destination) throws SmartsheetException; /** *

Creates s copy of the specified Sight.

* *

It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/move

* * @param sightId the Id of the Sight * @param destination the destination to copy to * @return the newly created Sight resource. * @throws IllegalArgumentException if any argument is null or empty string * @throws InvalidRequestException if there is any problem with the REST API request * @throws AuthorizationException if there is any problem with the REST API authorization (access token) * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) * @throws SmartsheetException if there is any other error during the operation */ Sight moveSight(long sightId, ContainerDestination destination) throws SmartsheetException; /** *

Get the publish status of a Sight.

* *

It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/publish

* * @param sightId the Id of the Sight * @return the Sight's publish status. * @throws IllegalArgumentException if any argument is null or empty string * @throws InvalidRequestException if there is any problem with the REST API request * @throws AuthorizationException if there is any problem with the REST API authorization (access token) * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) * @throws SmartsheetException if there is any other error during the operation */ SightPublish getPublishStatus(long sightId) throws SmartsheetException; /** *

Sets the publish status of a Sight and returns the new status, including the URLs of any enabled publishing.

* *

It mirrors to the following Smartsheet REST API method: PUT /sights/{sightId}/publish

* * @param sightId the Id of the Sight * @param sightPublish the SightPublish object containing publish status * @return the Sight's publish status. * @throws IllegalArgumentException if any argument is null or empty string * @throws InvalidRequestException if there is any problem with the REST API request * @throws AuthorizationException if there is any problem with the REST API authorization (access token) * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) * @throws SmartsheetException if there is any other error during the operation */ SightPublish setPublishStatus(long sightId, SightPublish sightPublish) throws SmartsheetException; /** *

Return the ShareResources object that provides access to share resources associated with * Sight resources.

* * @return the associated share resources */ ShareResources shareResources(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy