updatePolicyWithHttpInfo method

Future<Response> updatePolicyWithHttpInfo(
  1. int policyId,
  2. UpdatePolicyRequest updatePolicyRequest
)

Update policy

Update a policy's settings (name, enabled, default).

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> updatePolicyWithHttpInfo(int policyId, UpdatePolicyRequest updatePolicyRequest,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/policies/{policy_id}'
    .replaceAll('{policy_id}', policyId.toString());

  // ignore: prefer_final_locals
  Object? postBody = updatePolicyRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'PUT',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}