Table of Contents

Class TemplatesRequestBuilder

Namespace
Autodesk.ACC.CostManagement.V1.Projects.Item.Templates
Assembly
Autodesk.ACC.CostManagement.dll

Builds and executes requests for operations under \v1\projects{projectId}\templates

public class TemplatesRequestBuilder : BaseRequestBuilder
Inheritance
BaseRequestBuilder
TemplatesRequestBuilder
Inherited Members
BaseRequestBuilder.PathParameters
BaseRequestBuilder.RequestAdapter
BaseRequestBuilder.UrlTemplate

Constructors

TemplatesRequestBuilder(Dictionary<string, object>, IRequestAdapter)

Instantiates a new TemplatesRequestBuilder and sets the default values.

public TemplatesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter)

Parameters

pathParameters Dictionary<string, object>

Path parameters for the request

requestAdapter IRequestAdapter

The request adapter to use to execute the requests.

TemplatesRequestBuilder(string, IRequestAdapter)

Instantiates a new TemplatesRequestBuilder and sets the default values.

public TemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter)

Parameters

rawUrl string

The raw URL to use for the request builder.

requestAdapter IRequestAdapter

The request adapter to use to execute the requests.

Properties

this[Guid]

Gets an item from the Autodesk.ACC.CostManagement.v1.projects.item.templates.item collection

public WithTemplateItemRequestBuilder this[Guid position] { get; }

Parameters

position Guid

The budget code template ID. To obtain a template ID, use GET templates </en/docs/bim360/v1/reference/http/cost-templates-GET/>_.

Property Value

WithTemplateItemRequestBuilder

A WithTemplateItemRequestBuilder

this[string]

Gets an item from the Autodesk.ACC.CostManagement.v1.projects.item.templates.item collection

[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
public WithTemplateItemRequestBuilder this[string position] { get; }

Parameters

position string

The budget code template ID. To obtain a template ID, use GET templates </en/docs/bim360/v1/reference/http/cost-templates-GET/>_.

Property Value

WithTemplateItemRequestBuilder

A WithTemplateItemRequestBuilder

Methods

GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>?, CancellationToken)

Retrieves ID, name, and timestamp information for all templates in a specific project. Currently, a project can have only one template.

public Task<List<Template>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = null, CancellationToken cancellationToken = default)

Parameters

requestConfiguration Action<RequestConfiguration<DefaultQueryParameters>>

Configuration for the request such as headers, query parameters, and middleware options.

cancellationToken CancellationToken

Cancellation token to use when cancelling requests

Returns

Task<List<Template>>

A List<global::Autodesk.ACC.CostManagement.Models.Template>

Exceptions

DefinedError

When receiving a 400 status code

Error

When receiving a 401 status code

Error

When receiving a 403 status code

Error

When receiving a 404 status code

Error

When receiving a 500 status code

Error

When receiving a 503 status code

PostAsync(TemplatesPostRequestBody, Action<RequestConfiguration<DefaultQueryParameters>>?, CancellationToken)

Creates a budget code template in a specific project.

public Task<Template?> PostAsync(TemplatesPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = null, CancellationToken cancellationToken = default)

Parameters

body TemplatesPostRequestBody

The request body

requestConfiguration Action<RequestConfiguration<DefaultQueryParameters>>

Configuration for the request such as headers, query parameters, and middleware options.

cancellationToken CancellationToken

Cancellation token to use when cancelling requests

Returns

Task<Template>

A Template

Exceptions

DefinedError

When receiving a 400 status code

Error

When receiving a 401 status code

Error

When receiving a 403 status code

Error

When receiving a 404 status code

Error

When receiving a 500 status code

Error

When receiving a 503 status code

ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>?)

Retrieves ID, name, and timestamp information for all templates in a specific project. Currently, a project can have only one template.

public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = null)

Parameters

requestConfiguration Action<RequestConfiguration<DefaultQueryParameters>>

Configuration for the request such as headers, query parameters, and middleware options.

Returns

RequestInformation

A Microsoft.Kiota.Abstractions.RequestInformation

ToPostRequestInformation(TemplatesPostRequestBody, Action<RequestConfiguration<DefaultQueryParameters>>?)

Creates a budget code template in a specific project.

public RequestInformation ToPostRequestInformation(TemplatesPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = null)

Parameters

body TemplatesPostRequestBody

The request body

requestConfiguration Action<RequestConfiguration<DefaultQueryParameters>>

Configuration for the request such as headers, query parameters, and middleware options.

Returns

RequestInformation

A Microsoft.Kiota.Abstractions.RequestInformation

WithUrl(string)

Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.

public TemplatesRequestBuilder WithUrl(string rawUrl)

Parameters

rawUrl string

The raw URL to use for the request builder.

Returns

TemplatesRequestBuilder

A TemplatesRequestBuilder