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 408c3cc53b649cd4b92bfd922b85155b64d95760 into 13256175fe11cece8e735cb384c755675edc0400
  • Loading branch information
SDKAuto committed Aug 18, 2021
1 parent 3b51a6e commit 985edea
Show file tree
Hide file tree
Showing 14 changed files with 334 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
85 changes: 85 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 @@ -801,6 +853,19 @@ export interface PrivateEndpointConnectionsList extends Array<PrivateEndpointCon
nextLink?: string;
}

/**
* @interface
* Collection of outbound network dependency endpoints
* @extends Array<OutboundEnvironmentEndpoint>
*/
export interface OutboundEnvironmentEndpointCollection extends Array<OutboundEnvironmentEndpoint> {
/**
* Link to next page of resources.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly nextLink?: string;
}

/**
* @interface
* Gets all virtual network peerings under a workspace.
Expand Down Expand Up @@ -1274,6 +1339,26 @@ export type PrivateEndpointConnectionsListNextResponse = PrivateEndpointConnecti
};
};

/**
* Contains response data for the list operation.
*/
export type OutboundNetworkDependenciesEndpointsListResponse = OutboundEnvironmentEndpointCollection & {
/**
* 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: OutboundEnvironmentEndpointCollection;
};
};

/**
* Contains response data for the get operation.
*/
Expand Down
112 changes: 112 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 Expand Up @@ -1306,6 +1396,28 @@ export const PrivateEndpointConnectionsList: msRest.CompositeMapper = {
}
};

export const OutboundEnvironmentEndpointCollection: msRest.CompositeMapper = {
serializedName: "OutboundEnvironmentEndpointCollection",
type: {
name: "Composite",
className: "OutboundEnvironmentEndpointCollection",
modelProperties: {
value: {
serializedName: "",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "OutboundEnvironmentEndpoint"
}
}
}
}
}
}
};

export const VirtualNetworkPeeringList: msRest.CompositeMapper = {
serializedName: "VirtualNetworkPeeringList",
type: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* 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,
OutboundEnvironmentEndpointCollection
} 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
Loading

0 comments on commit 985edea

Please sign in to comment.