Box.V2.Managers.BoxLegalHoldPoliciesManager.GetListLegalHoldPoliciesAsync C# (CSharp) Метод

GetListLegalHoldPoliciesAsync() публичный Метод

Get a list of Legal Hold Policies that belong to your Enterprise.
public GetListLegalHoldPoliciesAsync ( string policyName = null, string fields = null, int limit = 100, string marker = null, bool autoPaginate = false ) : Task>
policyName string Case insensitive prefix-match filter on Policy name.
fields string Attribute(s) to include in the response.
limit int Limit result size to this number. Defaults to 100, maximum is 1,000.
marker string Take from "next_marker" column of a prior call to get the next page.
autoPaginate bool Whether or not to auto-paginate to fetch all items; defaults to false.
Результат Task>
        public async Task<BoxCollectionMarkerBased<BoxLegalHoldPolicy>> GetListLegalHoldPoliciesAsync(string policyName = null, string fields = null, int limit = 100, string marker = null, bool autoPaginate = false)
        {
            BoxRequest request = new BoxRequest(_config.LegalHoldPoliciesEndpointUri)
                .Method(RequestMethod.Get)
                .Param("policy_name", policyName)
                .Param("fields", fields)
                .Param("limit", limit.ToString())
                .Param("marker", marker);

            if (autoPaginate)
            {
                return await AutoPaginateMarker<BoxLegalHoldPolicy>(request, limit);
            }
            else
            {
                IBoxResponse<BoxCollectionMarkerBased<BoxLegalHoldPolicy>> response = await ToResponseAsync<BoxCollectionMarkerBased<BoxLegalHoldPolicy>>(request).ConfigureAwait(false);
                return response.ResponseObject;
            }
        }