Skip to content

Commit

Permalink
Add public init for AwsServiceTrait, AwsArnTrait, ArwArmReferenceTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Sep 6, 2021
1 parent d2aadcd commit 6e23a36
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Sources/SotoSmithyAWS/Traits/AwsCoreTraits.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ public struct AwsServiceTrait: StaticTrait {
public let cloudFormationName: String?
public let cloudTrailEventSource: String?
public let endpointPrefix: String?

public init(sdkId: String, arnNamespace: String?, cloudFormationName: String?, cloudTrailEventSource: String?, endpointPrefix: String?) {
self.sdkId = sdkId
self.arnNamespace = arnNamespace
self.cloudFormationName = cloudFormationName
self.cloudTrailEventSource = cloudTrailEventSource
self.endpointPrefix = endpointPrefix
}
}

/// Defines an ARN of a Smithy resource shape.
Expand All @@ -36,6 +44,13 @@ public struct AwsArnTrait: StaticTrait {
public let absolute: Bool
public let noAccount: Bool
public let noRegion: Bool

public init(template: String, absolute: Bool, noAccount: Bool, noRegion: Bool) {
self.template = template
self.absolute = absolute
self.noAccount = noAccount
self.noRegion = noRegion
}
}

/// Specifies that a string shape contains a fully formed AWS ARN.
Expand All @@ -45,6 +60,12 @@ public struct AwsArnReferenceTrait: StaticTrait {
public let type: String?
public let service: ShapeId?
public let resource: ShapeId?

public init(type: String?, service: ShapeId?, resource: ShapeId?) {
self.type = type
self.service = service
self.resource = resource
}
}

/// Indicates that the target contains data of the specified classification.
Expand Down

0 comments on commit 6e23a36

Please sign in to comment.