Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Merged
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
2 changes: 0 additions & 2 deletions lib/services/apimanagement/lib/apiManagementClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export default class ApiManagementClient extends AzureServiceClient {
apiPolicy: operations.ApiPolicy;
apiSchema: operations.ApiSchema;
apiDiagnostic: operations.ApiDiagnostic;
apiDiagnosticLogger: operations.ApiDiagnosticLogger;
apiIssue: operations.ApiIssue;
apiIssueComment: operations.ApiIssueComment;
apiIssueAttachment: operations.ApiIssueAttachment;
Expand All @@ -78,7 +77,6 @@ export default class ApiManagementClient extends AzureServiceClient {
apiManagementOperations: operations.ApiManagementOperations;
apiManagementService: operations.ApiManagementService;
diagnostic: operations.Diagnostic;
diagnosticLogger: operations.DiagnosticLogger;
emailTemplate: operations.EmailTemplate;
group: operations.Group;
groupUser: operations.GroupUser;
Expand Down
4 changes: 1 addition & 3 deletions lib/services/apimanagement/lib/apiManagementClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ApiManagementClient extends ServiceClient {

super(credentials, options);

this.apiVersion = '2018-01-01';
this.apiVersion = '2018-06-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand Down Expand Up @@ -84,7 +84,6 @@ class ApiManagementClient extends ServiceClient {
this.apiPolicy = new operations.ApiPolicy(this);
this.apiSchema = new operations.ApiSchema(this);
this.apiDiagnostic = new operations.ApiDiagnostic(this);
this.apiDiagnosticLogger = new operations.ApiDiagnosticLogger(this);
this.apiIssue = new operations.ApiIssue(this);
this.apiIssueComment = new operations.ApiIssueComment(this);
this.apiIssueAttachment = new operations.ApiIssueAttachment(this);
Expand All @@ -94,7 +93,6 @@ class ApiManagementClient extends ServiceClient {
this.apiManagementOperations = new operations.ApiManagementOperations(this);
this.apiManagementService = new operations.ApiManagementService(this);
this.diagnostic = new operations.Diagnostic(this);
this.diagnosticLogger = new operations.DiagnosticLogger(this);
this.emailTemplate = new operations.EmailTemplate(this);
this.group = new operations.Group(this);
this.groupUser = new operations.GroupUser(this);
Expand Down
55 changes: 55 additions & 0 deletions lib/services/apimanagement/lib/models/bodyDiagnosticSettings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* 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';

/**
* Body logging settings.
*
*/
class BodyDiagnosticSettings {
/**
* Create a BodyDiagnosticSettings.
* @member {number} [bytes] Number of request body bytes to log.
*/
constructor() {
}

/**
* Defines the metadata of BodyDiagnosticSettings
*
* @returns {object} metadata of BodyDiagnosticSettings
*
*/
mapper() {
return {
required: false,
serializedName: 'BodyDiagnosticSettings',
type: {
name: 'Composite',
className: 'BodyDiagnosticSettings',
modelProperties: {
bytes: {
required: false,
serializedName: 'bytes',
constraints: {
InclusiveMaximum: 8192
},
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = BodyDiagnosticSettings;
71 changes: 66 additions & 5 deletions lib/services/apimanagement/lib/models/diagnosticContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,38 @@ const models = require('./index');
class DiagnosticContract extends models['Resource'] {
/**
* Create a DiagnosticContract.
* @member {boolean} enabled Indicates whether a diagnostic should receive
* data or not.
* @member {string} [alwaysLog] Specifies for what type of messages sampling
* settings should not apply. Possible values include: 'allErrors'
* @member {string} loggerId Resource Id of a target logger.
* @member {object} [sampling] Sampling settings for Diagnostic.
* @member {string} [sampling.samplingType] Sampling type. Possible values
* include: 'fixed'
* @member {number} [sampling.percentage] Rate of sampling for fixed-rate
* sampling.
* @member {object} [frontend] Diagnostic settings for incoming/outcoming
* HTTP messages to the Gateway.
* @member {object} [frontend.request] Diagnostic settings for request.
* @member {array} [frontend.request.headers] Array of HTTP Headers to log.
* @member {object} [frontend.request.body] Body logging settings.
* @member {number} [frontend.request.body.bytes] Number of request body
* bytes to log.
* @member {object} [frontend.response] Diagnostic settings for response.
* @member {array} [frontend.response.headers] Array of HTTP Headers to log.
* @member {object} [frontend.response.body] Body logging settings.
* @member {number} [frontend.response.body.bytes] Number of request body
* bytes to log.
* @member {object} [backend] Diagnostic settings for incoming/outcoming HTTP
* messages to the Backend
* @member {object} [backend.request] Diagnostic settings for request.
* @member {array} [backend.request.headers] Array of HTTP Headers to log.
* @member {object} [backend.request.body] Body logging settings.
* @member {number} [backend.request.body.bytes] Number of request body bytes
* to log.
* @member {object} [backend.response] Diagnostic settings for response.
* @member {array} [backend.response.headers] Array of HTTP Headers to log.
* @member {object} [backend.response.body] Body logging settings.
* @member {number} [backend.response.body.bytes] Number of request body
* bytes to log.
*/
constructor() {
super();
Expand Down Expand Up @@ -65,11 +95,42 @@ class DiagnosticContract extends models['Resource'] {
name: 'String'
}
},
enabled: {
alwaysLog: {
required: false,
serializedName: 'properties.alwaysLog',
type: {
name: 'String'
}
},
loggerId: {
required: true,
serializedName: 'properties.enabled',
serializedName: 'properties.loggerId',
type: {
name: 'String'
}
},
sampling: {
required: false,
serializedName: 'properties.sampling',
type: {
name: 'Composite',
className: 'SamplingSettings'
}
},
frontend: {
required: false,
serializedName: 'properties.frontend',
type: {
name: 'Composite',
className: 'PipelineDiagnosticSettings'
}
},
backend: {
required: false,
serializedName: 'properties.backend',
type: {
name: 'Boolean'
name: 'Composite',
className: 'PipelineDiagnosticSettings'
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions lib/services/apimanagement/lib/models/errorResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
const models = require('./index');

/**
* Error Body contract.
* Error Response.
*
*/
class ErrorResponse {
Expand Down Expand Up @@ -44,21 +44,21 @@ class ErrorResponse {
modelProperties: {
code: {
required: false,
serializedName: 'code',
serializedName: 'error.code',
type: {
name: 'String'
}
},
message: {
required: false,
serializedName: 'message',
serializedName: 'error.message',
type: {
name: 'String'
}
},
details: {
required: false,
serializedName: 'details',
serializedName: 'error.details',
type: {
name: 'Sequence',
element: {
Expand Down
80 changes: 80 additions & 0 deletions lib/services/apimanagement/lib/models/errorResponseBody.js
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;
71 changes: 71 additions & 0 deletions lib/services/apimanagement/lib/models/httpMessageDiagnostic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* 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');

/**
* Http message diagnostic settings.
*
*/
class HttpMessageDiagnostic {
/**
* Create a HttpMessageDiagnostic.
* @member {array} [headers] Array of HTTP Headers to log.
* @member {object} [body] Body logging settings.
* @member {number} [body.bytes] Number of request body bytes to log.
*/
constructor() {
}

/**
* Defines the metadata of HttpMessageDiagnostic
*
* @returns {object} metadata of HttpMessageDiagnostic
*
*/
mapper() {
return {
required: false,
serializedName: 'HttpMessageDiagnostic',
type: {
name: 'Composite',
className: 'HttpMessageDiagnostic',
modelProperties: {
headers: {
required: false,
serializedName: 'headers',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
body: {
required: false,
serializedName: 'body',
type: {
name: 'Composite',
className: 'BodyDiagnosticSettings'
}
}
}
}
};
}
}

module.exports = HttpMessageDiagnostic;
Loading