UNPKG

@datadog/datadog-api-client

Version:

OpenAPI client for Datadog APIs

152 lines (151 loc) 6.39 kB
import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi"; import { Configuration } from "../../datadog-api-client-common/configuration"; import { RequestContext, ResponseContext } from "../../datadog-api-client-common/http/http"; import { DevicesListData } from "../models/DevicesListData"; import { GetDeviceResponse } from "../models/GetDeviceResponse"; import { GetInterfacesResponse } from "../models/GetInterfacesResponse"; import { ListDevicesResponse } from "../models/ListDevicesResponse"; import { ListTagsResponse } from "../models/ListTagsResponse"; export declare class NetworkDeviceMonitoringApiRequestFactory extends BaseAPIRequestFactory { getDevice(deviceId: string, _options?: Configuration): Promise<RequestContext>; getInterfaces(deviceId: string, getIpAddresses?: boolean, _options?: Configuration): Promise<RequestContext>; listDevices(pageSize?: number, pageNumber?: number, sort?: string, filterTag?: string, _options?: Configuration): Promise<RequestContext>; listDeviceUserTags(deviceId: string, _options?: Configuration): Promise<RequestContext>; updateDeviceUserTags(deviceId: string, body: ListTagsResponse, _options?: Configuration): Promise<RequestContext>; } export declare class NetworkDeviceMonitoringApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getDevice * @throws ApiException if the response code was not in [200, 299] */ getDevice(response: ResponseContext): Promise<GetDeviceResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getInterfaces * @throws ApiException if the response code was not in [200, 299] */ getInterfaces(response: ResponseContext): Promise<GetInterfacesResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listDevices * @throws ApiException if the response code was not in [200, 299] */ listDevices(response: ResponseContext): Promise<ListDevicesResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listDeviceUserTags * @throws ApiException if the response code was not in [200, 299] */ listDeviceUserTags(response: ResponseContext): Promise<ListTagsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateDeviceUserTags * @throws ApiException if the response code was not in [200, 299] */ updateDeviceUserTags(response: ResponseContext): Promise<ListTagsResponse>; } export interface NetworkDeviceMonitoringApiGetDeviceRequest { /** * The id of the device to fetch. * @type string */ deviceId: string; } export interface NetworkDeviceMonitoringApiGetInterfacesRequest { /** * The ID of the device to get interfaces from. * @type string */ deviceId: string; /** * Whether to get the IP addresses of the interfaces. * @type boolean */ getIpAddresses?: boolean; } export interface NetworkDeviceMonitoringApiListDevicesRequest { /** * Size for a given page. The maximum allowed value is 100. * @type number */ pageSize?: number; /** * Specific page number to return. * @type number */ pageNumber?: number; /** * The field to sort the devices by. * @type string */ sort?: string; /** * Filter devices by tag. * @type string */ filterTag?: string; } export interface NetworkDeviceMonitoringApiListDeviceUserTagsRequest { /** * The id of the device to fetch tags for. * @type string */ deviceId: string; } export interface NetworkDeviceMonitoringApiUpdateDeviceUserTagsRequest { /** * The id of the device to update tags for. * @type string */ deviceId: string; /** * @type ListTagsResponse */ body: ListTagsResponse; } export declare class NetworkDeviceMonitoringApi { private requestFactory; private responseProcessor; private configuration; constructor(configuration: Configuration, requestFactory?: NetworkDeviceMonitoringApiRequestFactory, responseProcessor?: NetworkDeviceMonitoringApiResponseProcessor); /** * Get the device details. * @param param The request object */ getDevice(param: NetworkDeviceMonitoringApiGetDeviceRequest, options?: Configuration): Promise<GetDeviceResponse>; /** * Get the list of interfaces of the device. * @param param The request object */ getInterfaces(param: NetworkDeviceMonitoringApiGetInterfacesRequest, options?: Configuration): Promise<GetInterfacesResponse>; /** * Get the list of devices. * @param param The request object */ listDevices(param?: NetworkDeviceMonitoringApiListDevicesRequest, options?: Configuration): Promise<ListDevicesResponse>; /** * Provide a paginated version of listDevices returning a generator with all the items. */ listDevicesWithPagination(param?: NetworkDeviceMonitoringApiListDevicesRequest, options?: Configuration): AsyncGenerator<DevicesListData>; /** * Get the list of tags for a device. * @param param The request object */ listDeviceUserTags(param: NetworkDeviceMonitoringApiListDeviceUserTagsRequest, options?: Configuration): Promise<ListTagsResponse>; /** * Update the tags for a device. * @param param The request object */ updateDeviceUserTags(param: NetworkDeviceMonitoringApiUpdateDeviceUserTagsRequest, options?: Configuration): Promise<ListTagsResponse>; }