This repository has been archived by the owner on May 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from 098c87d37f661c1aa51916e5dd2026aa1902c806 (#3033)
Fix contract for Error in OperationResultContract
- Loading branch information
1 parent
7bd148d
commit 030ee26
Showing
4 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
lib/services/apimanagement/lib/models/errorResponseBody.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const models = require('./index'); | ||
|
||
/** | ||
* Error Body contract. | ||
* | ||
*/ | ||
class ErrorResponseBody { | ||
/** | ||
* Create a ErrorResponseBody. | ||
* @member {string} [code] Service-defined error code. This code serves as a | ||
* sub-status for the HTTP error code specified in the response. | ||
* @member {string} [message] Human-readable representation of the error. | ||
* @member {array} [details] The list of invalid fields send in request, in | ||
* case of validation error. | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of ErrorResponseBody | ||
* | ||
* @returns {object} metadata of ErrorResponseBody | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'ErrorResponseBody', | ||
type: { | ||
name: 'Composite', | ||
className: 'ErrorResponseBody', | ||
modelProperties: { | ||
code: { | ||
required: false, | ||
serializedName: 'code', | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
message: { | ||
required: false, | ||
serializedName: 'message', | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
details: { | ||
required: false, | ||
serializedName: 'details', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'ErrorFieldContractElementType', | ||
type: { | ||
name: 'Composite', | ||
className: 'ErrorFieldContract' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = ErrorResponseBody; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters