Skip to content

Commit

Permalink
Regenerate client from commit 733cf3ea of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jan 2, 2025
1 parent 1d711d0 commit 4c91aa5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-02 15:18:20.432882",
"spec_repo_commit": "bc53c28f"
"regenerated": "2025-01-02 17:32:16.354936",
"spec_repo_commit": "733cf3ea"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-02 15:18:20.447693",
"spec_repo_commit": "bc53c28f"
"regenerated": "2025-01-02 17:32:16.370268",
"spec_repo_commit": "733cf3ea"
}
}
}
8 changes: 8 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40985,6 +40985,14 @@ paths:
operationId: UpdateRestrictionPolicy
parameters:
- $ref: '#/components/parameters/ResourceID'
- description: Allows admins (users with the `user_access_manage` permission)
to remove their own access from the resource if set to `true`. By default,
this is set to `false`, preventing admins from locking themselves out.
in: query
name: allow_self_lockout
required: false
schema:
type: string
requestBody:
content:
application/json:
Expand Down
4 changes: 4 additions & 0 deletions features/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5754,6 +5754,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
"type": "string",
"format": "",
},
"allowSelfLockout": {
"type": "string",
"format": "",
},
"body": {
"type": "RestrictionPolicyUpdateRequest",
"format": "",
Expand Down
16 changes: 16 additions & 0 deletions packages/datadog-api-client-v2/apis/RestrictionPoliciesApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export class RestrictionPoliciesApiRequestFactory extends BaseAPIRequestFactory
public async updateRestrictionPolicy(
resourceId: string,
body: RestrictionPolicyUpdateRequest,
allowSelfLockout?: string,
_options?: Configuration
): Promise<RequestContext> {
const _config = _options || this.configuration;
Expand Down Expand Up @@ -119,6 +120,15 @@ export class RestrictionPoliciesApiRequestFactory extends BaseAPIRequestFactory
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);

// Query Params
if (allowSelfLockout !== undefined) {
requestContext.setQueryParam(
"allow_self_lockout",
ObjectSerializer.serialize(allowSelfLockout, "string", ""),
""
);
}

// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
"application/json",
Expand Down Expand Up @@ -352,6 +362,11 @@ export interface RestrictionPoliciesApiUpdateRestrictionPolicyRequest {
* @type RestrictionPolicyUpdateRequest
*/
body: RestrictionPolicyUpdateRequest;
/**
* Allows admins (users with the `user_access_manage` permission) to remove their own access from the resource if set to `true`. By default, this is set to `false`, preventing admins from locking themselves out.
* @type string
*/
allowSelfLockout?: string;
}

export class RestrictionPoliciesApi {
Expand Down Expand Up @@ -453,6 +468,7 @@ export class RestrictionPoliciesApi {
const requestContextPromise = this.requestFactory.updateRestrictionPolicy(
param.resourceId,
param.body,
param.allowSelfLockout,
options
);
return requestContextPromise.then((requestContext) => {
Expand Down

0 comments on commit 4c91aa5

Please sign in to comment.