Skip to content

Commit

Permalink
12.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SupportSDM committed Feb 12, 2025
1 parent 76b1957 commit e3f4328
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
19 changes: 19 additions & 0 deletions lib/grpc/plumbing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,23 @@ def self.convert_access_rules_to_plumbing(access_rules)
end
JSON.dump(access_rules)
end

def self.convert_access_rule_to_porcelain(access_rule_json)
if access_rule_json == nil
return nil
end
if access_rule_json == ""
return nil
end
JSON.parse(access_rule_json)
end

def self.convert_access_rule_to_plumbing(access_rule)
if access_rule == nil
return nil
end
JSON.dump(access_rule)
end
def self.convert_aks_to_porcelain(plumbing)
if plumbing == nil
return nil
Expand Down Expand Up @@ -1497,6 +1514,7 @@ def self.convert_account_grant_to_porcelain(plumbing)
return nil
end
porcelain = AccountGrant.new()
porcelain.access_rule = convert_access_rule_to_porcelain(plumbing.access_rule)
porcelain.account_id = (plumbing.account_id)
porcelain.id = (plumbing.id)
porcelain.resource_id = (plumbing.resource_id)
Expand All @@ -1510,6 +1528,7 @@ def self.convert_account_grant_to_plumbing(porcelain)
return nil
end
plumbing = V1::AccountGrant.new()
plumbing.access_rule = convert_access_rule_to_plumbing(porcelain.access_rule)
plumbing.account_id = (porcelain.account_id)
plumbing.id = (porcelain.id)
plumbing.resource_id = (porcelain.resource_id)
Expand Down
8 changes: 8 additions & 0 deletions lib/models/porcelain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,8 @@ def to_json(options = {})

# AccountGrants connect a resource directly to an account, giving the account the permission to connect to that resource.
class AccountGrant
# The access rule associated with this AccountGrant.
attr_accessor :access_rule
# The account ID of this AccountGrant.
attr_accessor :account_id
# Unique identifier of the AccountGrant.
Expand All @@ -1331,12 +1333,14 @@ class AccountGrant
attr_accessor :valid_until

def initialize(
access_rule: nil,
account_id: nil,
id: nil,
resource_id: nil,
start_from: nil,
valid_until: nil
)
@access_rule = access_rule == nil ? SDM::_porcelain_zero_value_access_rule() : access_rule
@account_id = account_id == nil ? "" : account_id
@id = id == nil ? "" : id
@resource_id = resource_id == nil ? "" : resource_id
Expand Down Expand Up @@ -14321,4 +14325,8 @@ def self._porcelain_zero_value_tags()
def self._porcelain_zero_value_access_rules()
[]
end
# @private
def self._porcelain_zero_value_access_rule()
{}
end
end
2 changes: 1 addition & 1 deletion lib/strongdm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Client
DEFAULT_BASE_RETRY_DELAY = 0.0030 # 30 ms
DEFAULT_MAX_RETRY_DELAY = 300 # 300 seconds
API_VERSION = "2024-03-28"
USER_AGENT = "strongdm-sdk-ruby/12.9.1"
USER_AGENT = "strongdm-sdk-ruby/12.10.0"
private_constant :DEFAULT_MAX_RETRIES, :DEFAULT_BASE_RETRY_DELAY, :DEFAULT_MAX_RETRY_DELAY, :API_VERSION, :USER_AGENT

# Creates a new strongDM API client.
Expand Down
2 changes: 1 addition & 1 deletion lib/version
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
#
module SDM
VERSION = "12.9.1"
VERSION = "12.10.0"
end
2 changes: 1 addition & 1 deletion lib/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
#
module SDM
VERSION = "12.9.1"
VERSION = "12.10.0"
end

0 comments on commit e3f4328

Please sign in to comment.