patchDBRPIDWithHttpInfo method

Future<Response> patchDBRPIDWithHttpInfo(
  1. String dbrpID,
  2. DBRPUpdate dBRPUpdate, {
  3. String? zapTraceSpan,
  4. String? orgID,
  5. String? org,
})

Update a database retention policy mapping

Note: This method returns the HTTP Response.

Parameters:

  • String dbrpID (required): The database retention policy mapping.

  • DBRPUpdate dBRPUpdate (required): Database retention policy update to apply

  • String zapTraceSpan: OpenTracing span context

  • String orgID: Specifies the organization ID of the mapping

  • String org: Specifies the organization name of the mapping

Implementation

Future<Response> patchDBRPIDWithHttpInfo(
  String dbrpID,
  DBRPUpdate dBRPUpdate, {
  String? zapTraceSpan,
  String? orgID,
  String? org,
}) async {
  final path = r'/dbrps/{dbrpID}'.replaceAll('{dbrpID}', dbrpID);

  // ignore: prefer_final_locals
  Object? postBody = dBRPUpdate;

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

  if (orgID != null) {
    queryParams
        .addAll(_convertParametersForCollectionFormat('', 'orgID', orgID));
  }
  if (org != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', 'org', org));
  }

  if (zapTraceSpan != null) {
    headerParams[r'Zap-Trace-Span'] = parameterToString(zapTraceSpan);
  }

  const authNames = <String>[
    'BasicAuthentication',
    'QuerystringAuthentication',
    'TokenAuthentication'
  ];
  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'PATCH',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes[0],
    authNames,
  );
}