Skip to content

Commit

Permalink
CodeGen from PR 13256 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge ea9dbe440a6966d6bcb0081e1dcc2960d43cf6b6 into 33f0337a7d01132c5b1ef9025208c6263b43507c
  • Loading branch information
SDKAuto committed Mar 11, 2021
1 parent 461643a commit e61c1f0
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,25 @@ export class AppPlatformManagementClientContext extends msRestAzure.AzureService
if (!options) {
options = {};
}
if (!options.userAgent) {
if(!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}

super(credentials, options);

this.apiVersion = '2020-11-01-preview';
this.apiVersion = '2021-03-03-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
this.subscriptionId = subscriptionId;

if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
}
Expand Down
1 change: 1 addition & 0 deletions sdk/appplatform/arm-appplatform/src/models/appsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export {
ProxyResource,
RequiredTraffic,
Resource,
ResourceRequests,
ResourceUploadDefinition,
ServiceResource,
Sku,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export {
ProxyResource,
RequiredTraffic,
Resource,
ResourceRequests,
ServiceResource,
Sku,
TemporaryDisk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export {
ProxyResource,
RequiredTraffic,
Resource,
ResourceRequests,
ServiceResource,
Sku,
TemporaryDisk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export {
ProxyResource,
RequiredTraffic,
Resource,
ResourceRequests,
ServiceResource,
Sku,
TemporaryDisk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export {
ProxyResource,
RequiredTraffic,
Resource,
ResourceRequests,
ServiceResource,
Sku,
TemporaryDisk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export {
ProxyResource,
RequiredTraffic,
Resource,
ResourceRequests,
ServiceResource,
Sku,
TemporaryDisk,
Expand Down
44 changes: 33 additions & 11 deletions sdk/appplatform/arm-appplatform/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ export interface ClusterResourceProperties {
*/
export interface Sku {
/**
* Name of the Sku
* Name of the Sku. Default value: 'S0'.
*/
name?: string;
/**
* Tier of the Sku
* Tier of the Sku. Default value: 'Standard'.
*/
tier?: string;
/**
Expand Down Expand Up @@ -417,7 +417,7 @@ export interface MonitoringSettingProperties {
error?: ErrorModel;
/**
* Indicates whether enable the trace functionality, which will be deprecated since api version
* 2020-11-01-preview. Please leverage appInsightsInstrumentationKey to indicate if
* 2021-03-03-preview. Please leverage appInsightsInstrumentationKey to indicate if
* monitoringSettings enabled or not
*/
traceEnabled?: boolean;
Expand Down Expand Up @@ -546,10 +546,6 @@ export interface AppResourceProperties {
* Indicate if only https is allowed.
*/
httpsOnly?: boolean;
/**
* Indicate if end to end TLS is enabled.
*/
enableEndToEndTLS?: boolean;
/**
* Date time when the resource is created
* **NOTE: This property will not be serialized. It can only be populated by the server.**
Expand All @@ -563,6 +559,10 @@ export interface AppResourceProperties {
* Persistent disk settings
*/
persistentDisk?: PersistentDisk;
/**
* Indicate if end to end TLS is enabled.
*/
enableEndToEndTLS?: boolean;
}

/**
Expand Down Expand Up @@ -822,20 +822,42 @@ export interface UserSourceInfo {
artifactSelector?: string;
}

/**
* Deployment resource request payload
*/
export interface ResourceRequests {
/**
* Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic
* tier, and {500m, 1, 2, 3, 4} for Standard tier.
*/
cpu?: string;
/**
* Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi}
* for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier.
*/
memory?: string;
}

/**
* Deployment settings payload
*/
export interface DeploymentSettings {
/**
* Required CPU, basic tier should be 1, standard tier should be in range (1, 4). Default value:
* 1.
* Required CPU. This should be 1 for Basic tier, and in range [1, 4] for Standard tier. This is
* deprecated starting from API version 2020-03-03-preview. Please use the resourceRequests field
* to set the CPU size. Default value: 1.
*/
cpu?: number;
/**
* Required Memory size in GB, basic tier should be in range (1, 2), standard tier should be in
* range (1, 8). Default value: 1.
* Required Memory size in GB. This should be in range [1, 2] for Basic tier, and in range [1, 8]
* for Standard tier. This is deprecated starting from API version 2020-03-03-preview. Please use
* the resourceRequests field to set the the memory size. Default value: 1.
*/
memoryInGB?: number;
/**
* The requested resource quantity.
*/
resourceRequests?: ResourceRequests;
/**
* JVM parameter
*/
Expand Down
43 changes: 37 additions & 6 deletions sdk/appplatform/arm-appplatform/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,14 @@ export const Sku: msRest.CompositeMapper = {
modelProperties: {
name: {
serializedName: "name",
defaultValue: 'S0',
type: {
name: "String"
}
},
tier: {
serializedName: "tier",
defaultValue: 'Standard',
type: {
name: "String"
}
Expand Down Expand Up @@ -910,12 +912,6 @@ export const AppResourceProperties: msRest.CompositeMapper = {
name: "Boolean"
}
},
enableEndToEndTLS: {
serializedName: "enableEndToEndTLS",
type: {
name: "Boolean"
}
},
createdTime: {
readOnly: true,
serializedName: "createdTime",
Expand All @@ -936,6 +932,12 @@ export const AppResourceProperties: msRest.CompositeMapper = {
name: "Composite",
className: "PersistentDisk"
}
},
enableEndToEndTLS: {
serializedName: "enableEndToEndTLS",
type: {
name: "Boolean"
}
}
}
}
Expand Down Expand Up @@ -1354,6 +1356,28 @@ export const UserSourceInfo: msRest.CompositeMapper = {
}
};

export const ResourceRequests: msRest.CompositeMapper = {
serializedName: "ResourceRequests",
type: {
name: "Composite",
className: "ResourceRequests",
modelProperties: {
cpu: {
serializedName: "cpu",
type: {
name: "String"
}
},
memory: {
serializedName: "memory",
type: {
name: "String"
}
}
}
}
};

export const DeploymentSettings: msRest.CompositeMapper = {
serializedName: "DeploymentSettings",
type: {
Expand All @@ -1374,6 +1398,13 @@ export const DeploymentSettings: msRest.CompositeMapper = {
name: "Number"
}
},
resourceRequests: {
serializedName: "resourceRequests",
type: {
name: "Composite",
className: "ResourceRequests"
}
},
jvmOptions: {
serializedName: "jvmOptions",
type: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export {
ProxyResource,
RequiredTraffic,
Resource,
ResourceRequests,
ServiceResource,
Sku,
TemporaryDisk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export {
RegenerateTestKeyRequestPayload,
RequiredTraffic,
Resource,
ResourceRequests,
ServiceResource,
ServiceResourceList,
Sku,
Expand Down

0 comments on commit e61c1f0

Please sign in to comment.