Skip to content

Commit

Permalink
CodeGen from PR 15498 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge c355e6ba1e7c8f33e3195b7335c6d21d1cd4b031 into bb530add3bb77c84e4e042b7e094b15cad91442a
  • Loading branch information
SDKAuto committed Aug 10, 2021
1 parent 3b51a6e commit 06b6578
Show file tree
Hide file tree
Showing 14 changed files with 308 additions and 39 deletions.
2 changes: 1 addition & 1 deletion sdk/databricks/arm-databricks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/databricks/arm-databricks",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/databricks/arm-databricks",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class AzureDatabricksManagementClient extends AzureDatabricksManagementClientCon
operations: operations.Operations;
privateLinkResources: operations.PrivateLinkResources;
privateEndpointConnections: operations.PrivateEndpointConnections;
outboundNetworkDependenciesEndpoints: operations.OutboundNetworkDependenciesEndpoints;
vNetPeering: operations.VNetPeering;

/**
Expand All @@ -40,6 +41,7 @@ class AzureDatabricksManagementClient extends AzureDatabricksManagementClientCon
this.operations = new operations.Operations(this);
this.privateLinkResources = new operations.PrivateLinkResources(this);
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
this.outboundNetworkDependenciesEndpoints = new operations.OutboundNetworkDependenciesEndpoints(this);
this.vNetPeering = new operations.VNetPeering(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const packageVersion = "2.0.0";
export class AzureDatabricksManagementClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials | TokenCredential;
subscriptionId: string;
apiVersion?: string;

/**
* Initializes a new instance of the AzureDatabricksManagementClient class.
Expand Down Expand Up @@ -48,6 +49,7 @@ export class AzureDatabricksManagementClientContext extends msRestAzure.AzureSer

super(credentials, options);

this.apiVersion = '2021-04-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
72 changes: 72 additions & 0 deletions sdk/databricks/arm-databricks/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,58 @@ export interface GroupIdInformation extends Resource {
properties: GroupIdInformationProperties;
}

/**
* Connect information from the Workspace to a single endpoint.
*/
export interface EndpointDetail {
/**
* An IP Address that Domain Name currently resolves to.
*/
ipAddress?: string;
/**
* The port an endpoint is connected to.
*/
port?: number;
/**
* The time in milliseconds it takes for the connection to be created from the Workspace to this
* IpAddress at this Port.
*/
latency?: number;
/**
* Whether it is possible to create a connection from the Workspace to this IpAddress at this
* Port.
*/
isAccessible?: boolean;
}

/**
* A domain name or IP address the Workspace is reaching at.
*/
export interface EndpointDependency {
/**
* The domain name of the dependency.
*/
domainName?: string;
/**
* The Ports used when connecting to domainName.
*/
endpointDetails?: EndpointDetail[];
}

/**
* Egress endpoints which Workspace connects to for common purposes.
*/
export interface OutboundEnvironmentEndpoint {
/**
* The category of endpoints accessed by the Workspace, e.g. azure-storage, azure-mysql, etc.
*/
category?: string;
/**
* The endpoints that Workspace connect to
*/
endpoints?: EndpointDependency[];
}

/**
* The remote virtual network should be in the same region. See here to learn more
* (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering).
Expand Down Expand Up @@ -1274,6 +1326,26 @@ export type PrivateEndpointConnectionsListNextResponse = PrivateEndpointConnecti
};
};

/**
* Contains response data for the list operation.
*/
export type OutboundNetworkDependenciesEndpointsListResponse = Array<OutboundEnvironmentEndpoint> & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: OutboundEnvironmentEndpoint[];
};
};

/**
* Contains response data for the get operation.
*/
Expand Down
90 changes: 90 additions & 0 deletions sdk/databricks/arm-databricks/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,96 @@ export const GroupIdInformation: msRest.CompositeMapper = {
}
};

export const EndpointDetail: msRest.CompositeMapper = {
serializedName: "EndpointDetail",
type: {
name: "Composite",
className: "EndpointDetail",
modelProperties: {
ipAddress: {
serializedName: "ipAddress",
type: {
name: "String"
}
},
port: {
serializedName: "port",
type: {
name: "Number"
}
},
latency: {
serializedName: "latency",
type: {
name: "Number"
}
},
isAccessible: {
serializedName: "isAccessible",
type: {
name: "Boolean"
}
}
}
}
};

export const EndpointDependency: msRest.CompositeMapper = {
serializedName: "EndpointDependency",
type: {
name: "Composite",
className: "EndpointDependency",
modelProperties: {
domainName: {
serializedName: "domainName",
type: {
name: "String"
}
},
endpointDetails: {
serializedName: "endpointDetails",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "EndpointDetail"
}
}
}
}
}
}
};

export const OutboundEnvironmentEndpoint: msRest.CompositeMapper = {
serializedName: "OutboundEnvironmentEndpoint",
type: {
name: "Composite",
className: "OutboundEnvironmentEndpoint",
modelProperties: {
category: {
serializedName: "category",
type: {
name: "String"
}
},
endpoints: {
serializedName: "endpoints",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "EndpointDependency"
}
}
}
}
}
}
};

export const VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork: msRest.CompositeMapper = {
serializedName: "VirtualNetworkPeeringPropertiesFormat_databricksVirtualNetwork",
type: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

export {
EndpointDependency,
EndpointDetail,
ErrorDetail,
ErrorInfo,
ErrorResponse,
OutboundEnvironmentEndpoint
} from "../models/mappers";
16 changes: 1 addition & 15 deletions sdk/databricks/arm-databricks/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,11 @@ export const acceptLanguage: msRest.OperationParameter = {
}
}
};
export const apiVersion0: msRest.OperationQueryParameter = {
export const apiVersion: msRest.OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
required: true,
isConstant: true,
serializedName: "api-version",
defaultValue: '2021-04-01-preview',
type: {
name: "String"
}
}
};
export const apiVersion1: msRest.OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
required: true,
isConstant: true,
serializedName: "api-version",
defaultValue: '2018-04-01',
type: {
name: "String"
}
Expand Down
1 change: 1 addition & 0 deletions sdk/databricks/arm-databricks/src/operations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export * from "./workspaces";
export * from "./operations";
export * from "./privateLinkResources";
export * from "./privateEndpointConnections";
export * from "./outboundNetworkDependenciesEndpoints";
export * from "./vNetPeering";
4 changes: 2 additions & 2 deletions sdk/databricks/arm-databricks/src/operations/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const listOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "providers/Microsoft.Databricks/operations",
queryParameters: [
Parameters.apiVersion0
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
Expand All @@ -108,7 +108,7 @@ const listNextOperationSpec: msRest.OperationSpec = {
Parameters.nextPageLink
],
queryParameters: [
Parameters.apiVersion0
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

import * as msRest from "@azure/ms-rest-js";
import * as Models from "../models";
import * as Mappers from "../models/outboundNetworkDependenciesEndpointsMappers";
import * as Parameters from "../models/parameters";
import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext";

/** Class representing a OutboundNetworkDependenciesEndpoints. */
export class OutboundNetworkDependenciesEndpoints {
private readonly client: AzureDatabricksManagementClientContext;

/**
* Create a OutboundNetworkDependenciesEndpoints.
* @param {AzureDatabricksManagementClientContext} client Reference to the service client.
*/
constructor(client: AzureDatabricksManagementClientContext) {
this.client = client;
}

/**
* Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the
* specified Workspace. The operation returns properties of each egress endpoint.
* @summary Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the
* specified Workspace.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param [options] The optional parameters
* @returns Promise<Models.OutboundNetworkDependenciesEndpointsListResponse>
*/
list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise<Models.OutboundNetworkDependenciesEndpointsListResponse>;
/**
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param callback The callback
*/
list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback<Models.OutboundEnvironmentEndpoint[]>): void;
/**
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param options The optional parameters
* @param callback The callback
*/
list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OutboundEnvironmentEndpoint[]>): void;
list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OutboundEnvironmentEndpoint[]>, callback?: msRest.ServiceCallback<Models.OutboundEnvironmentEndpoint[]>): Promise<Models.OutboundNetworkDependenciesEndpointsListResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
workspaceName,
options
},
listOperationSpec,
callback) as Promise<Models.OutboundNetworkDependenciesEndpointsListResponse>;
}
}

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints",
urlParameters: [
Parameters.resourceGroupName,
Parameters.workspaceName,
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: {
serializedName: "parsedResponse",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "OutboundEnvironmentEndpoint"
}
}
}
}
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};
Loading

0 comments on commit 06b6578

Please sign in to comment.