class_docstr: RetryPolicy base class
  
  Attributes:
      backoff_rate (float): The multiplier by which the retry interval increases
          during each attempt (default: 2.0)
      interval_seconds (int): An integer that represents the number of seconds before the
          first retry attempt (default: 1)
      max_attempts (int): A positive integer that represents the maximum
          number of retry attempts. (default: None)
      expire_after_mins (int): A positive integer that represents the maximum minute
          to expire any further retry attempt (default: None)
class_docstr_tok: ["RetryPolicy","base","class","Attributes",":","backoff_rate","(","float",")",":","The","multiplier","by","which","the","retry","interval","increases","during","each","attempt","(","default",":","2.0",")","interval_seconds","(","int",")",":","An","integer","that","represents","the","number","of","seconds","before","the","first","retry","attempt","(","default",":","1",")","max_attempts","(","int",")",":","A","positive","integer","that","represents","the","maximum","number","of","retry","attempts",".","(","default",":","None",")","expire_after_mins","(","int",")",":","A","positive","integer","that","represents","the","maximum","minute","to","expire","any","further","retry","attempt","(","default",":","None",")"]
docstr: Get the request structure for workflow service calls.
docstr_tok: ["Get","the","request","structure","for","workflow","service","calls","."]
code: def to_request(self) -> RequestType:
      """Get the request structure for workflow service calls."""
      if (self.max_attempts is None) == self.expire_after_mins is None:
          raise ValueError(
              "Only one of [max_attempts] and [expire_after_mins] can be given."
          )
  
      request = {
          "BackoffRate": self.backoff_rate,
          "IntervalSeconds": self.interval_seconds,
      }
  
      if self.max_attempts:
          request["MaxAttempts"] = self.max_attempts
  
      if self.expire_after_mins:
          request["ExpireAfterMin"] = self.expire_after_mins
  
      return request
  
imports: from __future__ import absolute_import
  from enum import Enum
  from typing import List
  import attr
  from sagemaker.workflow.entities import Entity, DefaultEnumMeta, RequestType
label_desc: Use image node_id 5 for calling the RetryPolicy obj's underlying member method code with example usage: obj.to_request() and returns: request