Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

export {
discriminators,
AscOperation,
CloudError,
ErrorResponse
} from "../models/mappers";
102 changes: 69 additions & 33 deletions sdk/storagecache/arm-storagecache/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,50 @@ export interface CloudErrorBody {
target?: string;
}

/**
* Describes the format of Error response.
*/
export interface ErrorResponse {
/**
* Error code
*/
code?: string;
/**
* Error message indicating why the operation failed.
*/
message?: string;
}

/**
* The status of operation.
*/
export interface AscOperation {
/**
* The operation Id.
*/
id?: string;
/**
* The operation name.
*/
name?: string;
/**
* The start time of the operation.
*/
startTime?: string;
/**
* The end time of the operation.
*/
endTime?: string;
/**
* The status of the operation.
*/
status?: string;
/**
* The error detail of the operation if any.
*/
error?: ErrorResponse;
}

/**
* Cache identity properties.
*/
Expand Down Expand Up @@ -349,15 +393,11 @@ export interface StorageTargetProperties {
/**
* Polymorphic Discriminator
*/
targetBaseType: "StorageTargetProperties";
targetType: "StorageTargetProperties";
/**
* List of Cache namespace junctions to target for namespace associations.
*/
junctions?: NamespaceJunction[];
/**
* Type of the Storage Target.
*/
targetType?: string;
/**
* ARM provisioning state, see
* https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
Expand Down Expand Up @@ -408,10 +448,6 @@ export interface StorageTarget extends StorageTargetResource {
* List of Cache namespace junctions to target for namespace associations.
*/
junctions?: NamespaceJunction[];
/**
* Type of the Storage Target.
*/
targetType?: string;
/**
* ARM provisioning state, see
* https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
Expand All @@ -434,7 +470,7 @@ export interface StorageTarget extends StorageTargetResource {
/**
* Polymorphic Discriminator
*/
targetBaseType: string;
targetType: string;
}

/**
Expand All @@ -444,15 +480,11 @@ export interface Nfs3TargetProperties {
/**
* Polymorphic Discriminator
*/
targetBaseType: "nfs3";
targetType: "nfs3";
/**
* List of Cache namespace junctions to target for namespace associations.
*/
junctions?: NamespaceJunction[];
/**
* Type of the Storage Target.
*/
targetType?: string;
/**
* ARM provisioning state, see
* https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
Expand Down Expand Up @@ -481,15 +513,11 @@ export interface ClfsTargetProperties {
/**
* Polymorphic Discriminator
*/
targetBaseType: "clfs";
targetType: "clfs";
/**
* List of Cache namespace junctions to target for namespace associations.
*/
junctions?: NamespaceJunction[];
/**
* Type of the Storage Target.
*/
targetType?: string;
/**
* ARM provisioning state, see
* https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
Expand Down Expand Up @@ -518,15 +546,11 @@ export interface UnknownTargetProperties {
/**
* Polymorphic Discriminator
*/
targetBaseType: "unknown";
targetType: "unknown";
/**
* List of Cache namespace junctions to target for namespace associations.
*/
junctions?: NamespaceJunction[];
/**
* Type of the Storage Target.
*/
targetType?: string;
/**
* ARM provisioning state, see
* https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
Expand Down Expand Up @@ -817,14 +841,6 @@ export type ProvisioningStateType = 'Succeeded' | 'Failed' | 'Cancelled' | 'Crea
*/
export type FirmwareStatusType = 'available' | 'unavailable';

/**
* Defines values for StorageTargetType.
* Possible values include: 'nfs3', 'clfs', 'unknown'
* @readonly
* @enum {string}
*/
export type StorageTargetType = 'nfs3' | 'clfs' | 'unknown';

/**
* Defines values for ReasonCode.
* Possible values include: 'QuotaId', 'NotAvailableForSubscription'
Expand Down Expand Up @@ -953,6 +969,26 @@ export type UsageModelsListNextResponse = UsageModelsResult & {
};
};

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

/**
* Contains response data for the list operation.
*/
Expand Down
93 changes: 75 additions & 18 deletions sdk/storagecache/arm-storagecache/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,75 @@ export const CloudErrorBody: msRest.CompositeMapper = {
}
};

export const ErrorResponse: msRest.CompositeMapper = {
serializedName: "ErrorResponse",
type: {
name: "Composite",
className: "ErrorResponse",
modelProperties: {
code: {
serializedName: "code",
type: {
name: "String"
}
},
message: {
serializedName: "message",
type: {
name: "String"
}
}
}
}
};

export const AscOperation: msRest.CompositeMapper = {
serializedName: "AscOperation",
type: {
name: "Composite",
className: "AscOperation",
modelProperties: {
id: {
serializedName: "id",
type: {
name: "String"
}
},
name: {
serializedName: "name",
type: {
name: "String"
}
},
startTime: {
serializedName: "startTime",
type: {
name: "String"
}
},
endTime: {
serializedName: "endTime",
type: {
name: "String"
}
},
status: {
serializedName: "status",
type: {
name: "String"
}
},
error: {
serializedName: "error",
type: {
name: "Composite",
className: "ErrorResponse"
}
}
}
}
};

export const CacheIdentity: msRest.CompositeMapper = {
serializedName: "CacheIdentity",
type: {
Expand Down Expand Up @@ -545,8 +614,8 @@ export const StorageTargetProperties: msRest.CompositeMapper = {
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "targetBaseType",
clientName: "targetBaseType"
serializedName: "targetType",
clientName: "targetType"
},
uberParent: "StorageTargetProperties",
className: "StorageTargetProperties",
Expand All @@ -563,12 +632,6 @@ export const StorageTargetProperties: msRest.CompositeMapper = {
}
}
},
targetType: {
serializedName: "targetType",
type: {
name: "String"
}
},
provisioningState: {
serializedName: "provisioningState",
type: {
Expand Down Expand Up @@ -596,9 +659,9 @@ export const StorageTargetProperties: msRest.CompositeMapper = {
className: "UnknownTarget"
}
},
targetBaseType: {
targetType: {
required: true,
serializedName: "targetBaseType",
serializedName: "targetType",
type: {
name: "String"
}
Expand Down Expand Up @@ -657,12 +720,6 @@ export const StorageTarget: msRest.CompositeMapper = {
}
}
},
targetType: {
serializedName: "properties.targetType",
type: {
name: "String"
}
},
provisioningState: {
serializedName: "properties.provisioningState",
type: {
Expand Down Expand Up @@ -690,9 +747,9 @@ export const StorageTarget: msRest.CompositeMapper = {
className: "UnknownTarget"
}
},
targetBaseType: {
targetType: {
required: true,
serializedName: "properties.targetBaseType",
serializedName: "properties.targetType",
type: {
name: "String"
}
Expand Down
20 changes: 20 additions & 0 deletions sdk/storagecache/arm-storagecache/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ export const cacheName: msRest.OperationURLParameter = {
}
}
};
export const location: msRest.OperationURLParameter = {
parameterPath: "location",
mapper: {
required: true,
serializedName: "location",
type: {
name: "String"
}
}
};
export const nextPageLink: msRest.OperationURLParameter = {
parameterPath: "nextPageLink",
mapper: {
Expand All @@ -54,6 +64,16 @@ export const nextPageLink: msRest.OperationURLParameter = {
},
skipEncoding: true
};
export const operationId: msRest.OperationURLParameter = {
parameterPath: "operationId",
mapper: {
required: true,
serializedName: "operationId",
type: {
name: "String"
}
}
};
export const resourceGroupName: msRest.OperationURLParameter = {
parameterPath: "resourceGroupName",
mapper: {
Expand Down
Loading