Skip to content

Commit

Permalink
fix(IAM Identity): re-gen service after recent API updates
Browse files Browse the repository at this point in the history
  • Loading branch information
padamstx committed Nov 19, 2020
1 parent 92410cc commit fa53c7f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 36 deletions.
59 changes: 28 additions & 31 deletions iam-identity/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

/**
* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-8d569e8f-20201030-111043
* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-ef9b3113-20201118-074613
*/


Expand Down Expand Up @@ -555,7 +555,8 @@ class IamIdentityV1 extends BaseService {
* only available if a description was provided during a create of a Service Id.
* @param {string[]} [params.uniqueInstanceCrns] - Optional list of CRNs (string array) which point to the services
* connected to the service ID.
* @param {CreateApiKeyRequest} [params.apikey] - Input body parameters for the Create API key V1 REST request.
* @param {ApiKeyInsideCreateServiceIdRequest} [params.apikey] - Parameters for the API key in the Create service Id
* V1 REST request.
* @param {string} [params.entityLock] - Indicates if the service ID is locked for further write operations. False by
* default.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
Expand Down Expand Up @@ -1050,8 +1051,8 @@ namespace IamIdentityV1 {
description?: string;
/** Optional list of CRNs (string array) which point to the services connected to the service ID. */
uniqueInstanceCrns?: string[];
/** Input body parameters for the Create API key V1 REST request. */
apikey?: CreateApiKeyRequest;
/** Parameters for the API key in the Create service Id V1 REST request. */
apikey?: ApiKeyInsideCreateServiceIdRequest;
/** Indicates if the service ID is locked for further write operations. False by default. */
entityLock?: string;
headers?: OutgoingHttpHeaders;
Expand Down Expand Up @@ -1159,6 +1160,29 @@ namespace IamIdentityV1 {
history?: EnityHistoryRecord[];
}

/** Parameters for the API key in the Create service Id V1 REST request. */
export interface ApiKeyInsideCreateServiceIdRequest {
/** Name of the API key. The name is not checked for uniqueness. Therefore multiple names with the same value
* can exist. Access is done via the UUID of the API key.
*/
name: string;
/** The optional description of the API key. The 'description' property is only available if a description was
* provided during a create of an API key.
*/
description?: string;
/** You can optionally passthrough the API key value for this API key. If passed, NO validation of that apiKey
* value is done, i.e. the value can be non-URL safe. If omitted, the API key management will create an URL safe
* opaque API key value. The value of the API key is checked for uniqueness. Please ensure enough variations when
* passing in this value.
*/
apikey?: string;
/** Send true or false to set whether the API key value is retrievable in the future by using the Get details of
* an API key request. If you create an API key for a user, you must specify `false` or omit the value. We don't
* allow storing of API keys for users.
*/
store_value?: boolean;
}

/** Response body format for the List API keys V1 REST request. */
export interface ApiKeyList {
/** Context with key properties for problem determination. */
Expand All @@ -1181,33 +1205,6 @@ namespace IamIdentityV1 {
apikeys: ApiKey[];
}

/** Input body parameters for the Create API key V1 REST request. */
export interface CreateApiKeyRequest {
/** Name of the API key. The name is not checked for uniqueness. Therefore multiple names with the same value
* can exist. Access is done via the UUID of the API key.
*/
name: string;
/** The optional description of the API key. The 'description' property is only available if a description was
* provided during a create of an API key.
*/
description?: string;
/** The iam_id that this API key authenticates. */
iam_id: string;
/** The account ID of the API key. */
account_id?: string;
/** You can optionally passthrough the API key value for this API key. If passed, NO validation of that apiKey
* value is done, i.e. the value can be non-URL safe. If omitted, the API key management will create an URL safe
* opaque API key value. The value of the API key is checked for uniqueness. Please ensure enough variations when
* passing in this value.
*/
apikey?: string;
/** Send true or false to set whether the API key value is retrievable in the future by using the Get details of
* an API key request. If you create an API key for a user, you must specify `false` or omit the value. We don't
* allow storing of API keys for users.
*/
store_value?: boolean;
}

/** Response body format for an entity history record. */
export interface EnityHistoryRecord {
/** Timestamp when the action was triggered. */
Expand Down
8 changes: 3 additions & 5 deletions test/unit/iam-identity.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,12 +735,10 @@ describe('IamIdentityV1', () => {
describe('positive tests', () => {
// Request models needed by this operation.

// CreateApiKeyRequest
const createApiKeyRequestModel = {
// ApiKeyInsideCreateServiceIdRequest
const apiKeyInsideCreateServiceIdRequestModel = {
name: 'testString',
description: 'testString',
iam_id: 'testString',
account_id: 'testString',
apikey: 'testString',
store_value: true,
};
Expand All @@ -751,7 +749,7 @@ describe('IamIdentityV1', () => {
const name = 'testString';
const description = 'testString';
const uniqueInstanceCrns = ['testString'];
const apikey = createApiKeyRequestModel;
const apikey = apiKeyInsideCreateServiceIdRequestModel;
const entityLock = 'testString';
const params = {
accountId: accountId,
Expand Down

0 comments on commit fa53c7f

Please sign in to comment.