Table of Contents

Class AttachmentsRequestBuilder

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

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

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

Constructors

AttachmentsRequestBuilder(Dictionary<string, object>, IRequestAdapter)

Instantiates a new AttachmentsRequestBuilder and sets the default values.

public AttachmentsRequestBuilder(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.

AttachmentsRequestBuilder(string, IRequestAdapter)

Instantiates a new AttachmentsRequestBuilder and sets the default values.

public AttachmentsRequestBuilder(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[string]

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

public WithAttachmentItemRequestBuilder this[string position] { get; }

Parameters

position string

The attachment ID.

Property Value

WithAttachmentItemRequestBuilder

A WithAttachmentItemRequestBuilder

Methods

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

Gets all the attachments associated with an item such as a budget, contract, or cost item.

public Task<List<Attachment>?> GetAsync(Action<RequestConfiguration<AttachmentsRequestBuilder.AttachmentsRequestBuilderGetQueryParameters>>? requestConfiguration = null, CancellationToken cancellationToken = default)

Parameters

requestConfiguration Action<RequestConfiguration<AttachmentsRequestBuilder.AttachmentsRequestBuilderGetQueryParameters>>

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

cancellationToken CancellationToken

Cancellation token to use when cancelling requests

Returns

Task<List<Attachment>>

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

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(AttachmentsPostRequestBody, Action<RequestConfiguration<DefaultQueryParameters>>?, CancellationToken)

Creates an attachment in a specific project.

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

Parameters

body AttachmentsPostRequestBody

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<Attachment>

A Attachment

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<AttachmentsRequestBuilderGetQueryParameters>>?)

Gets all the attachments associated with an item such as a budget, contract, or cost item.

public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<AttachmentsRequestBuilder.AttachmentsRequestBuilderGetQueryParameters>>? requestConfiguration = null)

Parameters

requestConfiguration Action<RequestConfiguration<AttachmentsRequestBuilder.AttachmentsRequestBuilderGetQueryParameters>>

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

Returns

RequestInformation

A Microsoft.Kiota.Abstractions.RequestInformation

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

Creates an attachment in a specific project.

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

Parameters

body AttachmentsPostRequestBody

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 AttachmentsRequestBuilder WithUrl(string rawUrl)

Parameters

rawUrl string

The raw URL to use for the request builder.

Returns

AttachmentsRequestBuilder

A AttachmentsRequestBuilder