Class: SDM::ApprovalWorkflowApprovers
- Inherits:
-
Object
- Object
- SDM::ApprovalWorkflowApprovers
- Extended by:
- Gem::Deprecate
- Defined in:
- lib/svc.rb
Overview
ApprovalWorkflowApprovers link approval workflow approvers to an ApprovalWorkflowStep
Instance Method Summary collapse
-
#create(approval_workflow_approver, deadline: nil) ⇒ Object
Deprecated: Create creates a new approval workflow approver.
-
#delete(id, deadline: nil) ⇒ Object
Deprecated: Delete deletes an existing approval workflow approver.
-
#get(id, deadline: nil) ⇒ Object
Deprecated: Get reads one approval workflow approver by ID.
-
#initialize(channel, parent) ⇒ ApprovalWorkflowApprovers
constructor
A new instance of ApprovalWorkflowApprovers.
-
#list(filter, *args, deadline: nil) ⇒ Object
Deprecated: Lists existing approval workflow approvers.
Constructor Details
#initialize(channel, parent) ⇒ ApprovalWorkflowApprovers
1585 1586 1587 1588 1589 1590 1591 1592 |
# File 'lib/svc.rb', line 1585 def initialize(channel, parent) begin @stub = V1::ApprovalWorkflowApprovers::Stub.new(nil, nil, channel_override: channel) rescue => exception raise Plumbing::convert_error_to_porcelain(exception) end @parent = parent end |
Instance Method Details
#create(approval_workflow_approver, deadline: nil) ⇒ Object
Deprecated: Create creates a new approval workflow approver.
1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 |
# File 'lib/svc.rb', line 1595 def create( approval_workflow_approver, deadline: nil ) req = V1::ApprovalWorkflowApproverCreateRequest.new() req.approval_workflow_approver = Plumbing::convert_approval_workflow_approver_to_plumbing(approval_workflow_approver) # Execute before interceptor hooks req = @parent.interceptor.execute_before("ApprovalWorkflowApprovers.Create", self, req) tries = 0 plumbing_response = nil loop do begin plumbing_response = @stub.create(req, metadata: @parent.("ApprovalWorkflowApprovers.Create", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception, deadline)) tries + +sleep(@parent.exponentialBackoff(tries, deadline)) next end raise Plumbing::convert_error_to_porcelain(exception) end break end # Execute after interceptor hooks plumbing_response = @parent.interceptor.execute_after("ApprovalWorkflowApprovers.Create", self, req, plumbing_response) resp = ApprovalWorkflowApproverCreateResponse.new() resp.approval_workflow_approver = Plumbing::convert_approval_workflow_approver_to_porcelain(plumbing_response.approval_workflow_approver) resp.rate_limit = Plumbing::(plumbing_response.rate_limit) resp end |
#delete(id, deadline: nil) ⇒ Object
Deprecated: Delete deletes an existing approval workflow approver.
1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 |
# File 'lib/svc.rb', line 1668 def delete( id, deadline: nil ) req = V1::ApprovalWorkflowApproverDeleteRequest.new() req.id = (id) # Execute before interceptor hooks req = @parent.interceptor.execute_before("ApprovalWorkflowApprovers.Delete", self, req) tries = 0 plumbing_response = nil loop do begin plumbing_response = @stub.delete(req, metadata: @parent.("ApprovalWorkflowApprovers.Delete", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception, deadline)) tries + +sleep(@parent.exponentialBackoff(tries, deadline)) next end raise Plumbing::convert_error_to_porcelain(exception) end break end # Execute after interceptor hooks plumbing_response = @parent.interceptor.execute_after("ApprovalWorkflowApprovers.Delete", self, req, plumbing_response) resp = ApprovalWorkflowApproverDeleteResponse.new() resp.id = (plumbing_response.id) resp.rate_limit = Plumbing::(plumbing_response.rate_limit) resp end |
#get(id, deadline: nil) ⇒ Object
Deprecated: Get reads one approval workflow approver by ID.
1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 |
# File 'lib/svc.rb', line 1629 def get( id, deadline: nil ) req = V1::ApprovalWorkflowApproverGetRequest.new() if not @parent.snapshot_time.nil? req. = V1::GetRequestMetadata.new() req..snapshot_at = @parent.snapshot_time end req.id = (id) # Execute before interceptor hooks req = @parent.interceptor.execute_before("ApprovalWorkflowApprovers.Get", self, req) tries = 0 plumbing_response = nil loop do begin plumbing_response = @stub.get(req, metadata: @parent.("ApprovalWorkflowApprovers.Get", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception, deadline)) tries + +sleep(@parent.exponentialBackoff(tries, deadline)) next end raise Plumbing::convert_error_to_porcelain(exception) end break end # Execute after interceptor hooks plumbing_response = @parent.interceptor.execute_after("ApprovalWorkflowApprovers.Get", self, req, plumbing_response) resp = ApprovalWorkflowApproverGetResponse.new() resp.approval_workflow_approver = Plumbing::convert_approval_workflow_approver_to_porcelain(plumbing_response.approval_workflow_approver) resp. = Plumbing::(plumbing_response.) resp.rate_limit = Plumbing::(plumbing_response.rate_limit) resp end |
#list(filter, *args, deadline: nil) ⇒ Object
Deprecated: Lists existing approval workflow approvers.
1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 |
# File 'lib/svc.rb', line 1702 def list( filter, *args, deadline: nil ) req = V1::ApprovalWorkflowApproverListRequest.new() req. = V1::ListRequestMetadata.new() if not @parent.page_limit.nil? req..limit = @parent.page_limit end if not @parent.snapshot_time.nil? req..snapshot_at = @parent.snapshot_time end req.filter = Plumbing::quote_filter_args(filter, *args) resp = Enumerator::Generator.new { |g| tries = 0 loop do begin plumbing_response = @stub.list(req, metadata: @parent.("ApprovalWorkflowApprovers.List", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception, deadline)) tries + +sleep(@parent.exponentialBackoff(tries, deadline)) next end raise Plumbing::convert_error_to_porcelain(exception) end tries = 0 plumbing_response.approval_workflow_approvers.each do |plumbing_item| g.yield Plumbing::convert_approval_workflow_approver_to_porcelain(plumbing_item) end break if plumbing_response..next_cursor == "" req..cursor = plumbing_response..next_cursor end } resp end |