Skip to content

Commit

Permalink
[AutoPR] apimanagement/resource-manager (#491)
Browse files Browse the repository at this point in the history
* Generated from cbd8b32037c8d911d9c4024dd3accb02bfad8e93 (#465)

Remove readonly attribute from identities collection in users

* Regenerated "@azure/arm-apimanagement/lib" SDK.

* Generated from ccc27d4c2f7026867aa2bcf3e67b6359c3ec0f11 (#490)

Added missing PATCH operation to Api Issue resource

* [AutoPR apimanagement/resource-manager] /identity endpoint added (#484)

* Generated from 8363d68686accd9a2c5c1727ebab556ca7529cb3

/identity endpoint added

* Generated from 8363d68686accd9a2c5c1727ebab556ca7529cb3

/identity endpoint added

* Regenerated "@azure/arm-apimanagement" SDK.
  • Loading branch information
AutorestCI authored and kpajdzik committed Nov 14, 2018
1 parent 9ed036c commit 658c6de
Show file tree
Hide file tree
Showing 6 changed files with 337 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export {
ErrorFieldContract,
ApiIssueGetEntityTagHeaders,
ApiIssueGetHeaders,
IssueUpdateContract,
PolicyContract,
ApiContract,
AuthenticationSettingsContract,
Expand Down
109 changes: 107 additions & 2 deletions packages/@azure/arm-apimanagement/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,20 @@ export interface SchemaContract extends Resource {
* @extends Resource
*/
export interface IssueContract extends Resource {
/**
* @member {Date} [createdDate] Date and time when the issue was created.
*/
createdDate?: Date;
/**
* @member {State} [state] Status of the issue. Possible values include:
* 'proposed', 'open', 'removed', 'resolved', 'closed'
*/
state?: State;
/**
* @member {string} [apiId] A resource identifier for the API the issue was
* created for.
*/
apiId?: string;
/**
* @member {string} title The issue title.
*/
Expand All @@ -1169,6 +1183,20 @@ export interface IssueContract extends Resource {
* @member {string} description Text describing the issue.
*/
description: string;
/**
* @member {string} userId A resource identifier for the user created the
* issue.
*/
userId: string;
}

/**
* @interface
* An interface representing IssueUpdateContract.
* Issue update Parameters.
*
*/
export interface IssueUpdateContract {
/**
* @member {Date} [createdDate] Date and time when the issue was created.
*/
Expand All @@ -1179,10 +1207,41 @@ export interface IssueContract extends Resource {
*/
state?: State;
/**
* @member {string} userId A resource identifier for the user created the
* @member {string} [apiId] A resource identifier for the API the issue was
* created for.
*/
apiId?: string;
/**
* @member {string} [title] The issue title.
*/
title?: string;
/**
* @member {string} [description] Text describing the issue.
*/
description?: string;
/**
* @member {string} [userId] A resource identifier for the user created the
* issue.
*/
userId: string;
userId?: string;
}

/**
* @interface
* An interface representing IssueContractBaseProperties.
* Issue contract Base Properties.
*
*/
export interface IssueContractBaseProperties {
/**
* @member {Date} [createdDate] Date and time when the issue was created.
*/
createdDate?: Date;
/**
* @member {State} [state] Status of the issue. Possible values include:
* 'proposed', 'open', 'removed', 'resolved', 'closed'
*/
state?: State;
/**
* @member {string} [apiId] A resource identifier for the API the issue was
* created for.
Expand Down Expand Up @@ -5052,6 +5111,17 @@ export interface UserUpdateParameters {
lastName?: string;
}

/**
* @interface
* An interface representing CurrentUserIdentity.
*/
export interface CurrentUserIdentity {
/**
* @member {string} [id] API Management service user id.
*/
id?: string;
}

/**
* @interface
* An interface representing ApiVersionSetContract.
Expand Down Expand Up @@ -5567,6 +5637,22 @@ export interface ApiIssueCreateOrUpdateOptionalParams extends msRest.RequestOpti
ifMatch?: string;
}

/**
* @interface
* An interface representing ApiIssueUpdateOptionalParams.
* Optional Parameters.
*
* @extends RequestOptionsBase
*/
export interface ApiIssueUpdateOptionalParams extends msRest.RequestOptionsBase {
/**
* @member {string} [ifMatch] ETag of the Issue Entity. ETag should match the
* current entity state from the header response of the GET request or it
* should be * for unconditional update.
*/
ifMatch?: string;
}

/**
* @interface
* An interface representing ApiIssueCommentListByServiceOptionalParams.
Expand Down Expand Up @@ -13590,6 +13676,25 @@ export type TenantConfigurationBeginValidateResponse = OperationResultContract &
};
};

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

/**
* Contains response data for the listByService operation.
*/
Expand Down
94 changes: 92 additions & 2 deletions packages/@azure/arm-apimanagement/lib/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1680,6 +1680,24 @@ export const IssueContract: msRest.CompositeMapper = {
className: "IssueContract",
modelProperties: {
...Resource.type.modelProperties,
createdDate: {
serializedName: "properties.createdDate",
type: {
name: "DateTime"
}
},
state: {
serializedName: "properties.state",
type: {
name: "String"
}
},
apiId: {
serializedName: "properties.apiId",
type: {
name: "String"
}
},
title: {
required: true,
serializedName: "properties.title",
Expand All @@ -1694,6 +1712,23 @@ export const IssueContract: msRest.CompositeMapper = {
name: "String"
}
},
userId: {
required: true,
serializedName: "properties.userId",
type: {
name: "String"
}
}
}
}
};

export const IssueUpdateContract: msRest.CompositeMapper = {
serializedName: "IssueUpdateContract",
type: {
name: "Composite",
className: "IssueUpdateContract",
modelProperties: {
createdDate: {
serializedName: "properties.createdDate",
type: {
Expand All @@ -1706,15 +1741,54 @@ export const IssueContract: msRest.CompositeMapper = {
name: "String"
}
},
apiId: {
serializedName: "properties.apiId",
type: {
name: "String"
}
},
title: {
serializedName: "properties.title",
type: {
name: "String"
}
},
description: {
serializedName: "properties.description",
type: {
name: "String"
}
},
userId: {
required: true,
serializedName: "properties.userId",
type: {
name: "String"
}
}
}
}
};

export const IssueContractBaseProperties: msRest.CompositeMapper = {
serializedName: "IssueContractBaseProperties",
type: {
name: "Composite",
className: "IssueContractBaseProperties",
modelProperties: {
createdDate: {
serializedName: "createdDate",
type: {
name: "DateTime"
}
},
state: {
serializedName: "state",
type: {
name: "String"
}
},
apiId: {
serializedName: "properties.apiId",
serializedName: "apiId",
type: {
name: "String"
}
Expand Down Expand Up @@ -7077,6 +7151,22 @@ export const UserUpdateParameters: msRest.CompositeMapper = {
}
};

export const CurrentUserIdentity: msRest.CompositeMapper = {
serializedName: "CurrentUserIdentity",
type: {
name: "Composite",
className: "CurrentUserIdentity",
modelProperties: {
id: {
serializedName: "id",
type: {
name: "String"
}
}
}
}
};

export const ApiVersionSetContract: msRest.CompositeMapper = {
serializedName: "ApiVersionSetContract",
type: {
Expand Down
5 changes: 3 additions & 2 deletions packages/@azure/arm-apimanagement/lib/models/userMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
*/

export {
CurrentUserIdentity,
ErrorResponse,
ErrorFieldContract,
UserCollection,
UserContract,
Resource,
BaseResource,
UserIdentityContract,
GroupContractProperties,
ErrorResponse,
ErrorFieldContract,
UserGetEntityTagHeaders,
UserGetHeaders,
UserCreateParameters,
Expand Down
77 changes: 77 additions & 0 deletions packages/@azure/arm-apimanagement/lib/operations/apiIssue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,50 @@ export class ApiIssue {
callback) as Promise<Models.ApiIssueCreateOrUpdateResponse>;
}

/**
* Updates an existing issue for an API.
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param apiId API identifier. Must be unique in the current API Management service instance.
* @param issueId Issue identifier. Must be unique in the current API Management service instance.
* @param parameters Update parameters.
* @param [options] The optional parameters
* @returns Promise<msRest.RestResponse>
*/
update(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, parameters: Models.IssueUpdateContract, options?: Models.ApiIssueUpdateOptionalParams): Promise<msRest.RestResponse>;
/**
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param apiId API identifier. Must be unique in the current API Management service instance.
* @param issueId Issue identifier. Must be unique in the current API Management service instance.
* @param parameters Update parameters.
* @param callback The callback
*/
update(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, parameters: Models.IssueUpdateContract, callback: msRest.ServiceCallback<void>): void;
/**
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param apiId API identifier. Must be unique in the current API Management service instance.
* @param issueId Issue identifier. Must be unique in the current API Management service instance.
* @param parameters Update parameters.
* @param options The optional parameters
* @param callback The callback
*/
update(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, parameters: Models.IssueUpdateContract, options: Models.ApiIssueUpdateOptionalParams, callback: msRest.ServiceCallback<void>): void;
update(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, parameters: Models.IssueUpdateContract, options?: Models.ApiIssueUpdateOptionalParams | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
serviceName,
apiId,
issueId,
parameters,
options
},
updateOperationSpec,
callback);
}

/**
* Deletes the specified Issue from an API.
* @param resourceGroupName The name of the resource group.
Expand Down Expand Up @@ -386,6 +430,39 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
serializer
};

const updateOperationSpec: msRest.OperationSpec = {
httpMethod: "PATCH",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}",
urlParameters: [
Parameters.resourceGroupName,
Parameters.serviceName,
Parameters.apiId1,
Parameters.issueId,
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.ifMatch1,
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.IssueUpdateContract,
required: true
}
},
responses: {
204: {},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};

const deleteMethodOperationSpec: msRest.OperationSpec = {
httpMethod: "DELETE",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}",
Expand Down
Loading

0 comments on commit 658c6de

Please sign in to comment.