Module: Aws::Structure Private
- Included in:
- EmptyStructure, Aws::SSO::EndpointParameters, Aws::SSO::Types::AccountInfo, Aws::SSO::Types::GetRoleCredentialsRequest, Aws::SSO::Types::GetRoleCredentialsResponse, Aws::SSO::Types::InvalidRequestException, Aws::SSO::Types::ListAccountRolesRequest, Aws::SSO::Types::ListAccountRolesResponse, Aws::SSO::Types::ListAccountsRequest, Aws::SSO::Types::ListAccountsResponse, Aws::SSO::Types::LogoutRequest, Aws::SSO::Types::ResourceNotFoundException, Aws::SSO::Types::RoleCredentials, Aws::SSO::Types::RoleInfo, Aws::SSO::Types::TooManyRequestsException, Aws::SSO::Types::UnauthorizedException, Aws::SSOOIDC::EndpointParameters, Aws::SSOOIDC::Types::AccessDeniedException, Aws::SSOOIDC::Types::AuthorizationPendingException, Aws::SSOOIDC::Types::CreateTokenRequest, Aws::SSOOIDC::Types::CreateTokenResponse, Aws::SSOOIDC::Types::CreateTokenWithIAMRequest, Aws::SSOOIDC::Types::CreateTokenWithIAMResponse, Aws::SSOOIDC::Types::ExpiredTokenException, Aws::SSOOIDC::Types::InternalServerException, Aws::SSOOIDC::Types::InvalidClientException, Aws::SSOOIDC::Types::InvalidClientMetadataException, Aws::SSOOIDC::Types::InvalidGrantException, Aws::SSOOIDC::Types::InvalidRedirectUriException, Aws::SSOOIDC::Types::InvalidRequestException, Aws::SSOOIDC::Types::InvalidRequestRegionException, Aws::SSOOIDC::Types::InvalidScopeException, Aws::SSOOIDC::Types::RegisterClientRequest, Aws::SSOOIDC::Types::RegisterClientResponse, Aws::SSOOIDC::Types::SlowDownException, Aws::SSOOIDC::Types::StartDeviceAuthorizationRequest, Aws::SSOOIDC::Types::StartDeviceAuthorizationResponse, Aws::SSOOIDC::Types::UnauthorizedClientException, Aws::SSOOIDC::Types::UnsupportedGrantTypeException, Aws::STS::EndpointParameters, Aws::STS::Types::AssumeRoleRequest, Aws::STS::Types::AssumeRoleResponse, Aws::STS::Types::AssumeRoleWithSAMLRequest, Aws::STS::Types::AssumeRoleWithSAMLResponse, Aws::STS::Types::AssumeRoleWithWebIdentityRequest, Aws::STS::Types::AssumeRoleWithWebIdentityResponse, Aws::STS::Types::AssumeRootRequest, Aws::STS::Types::AssumeRootResponse, Aws::STS::Types::AssumedRoleUser, Aws::STS::Types::Credentials, Aws::STS::Types::DecodeAuthorizationMessageRequest, Aws::STS::Types::DecodeAuthorizationMessageResponse, Aws::STS::Types::ExpiredTokenException, Aws::STS::Types::FederatedUser, Aws::STS::Types::GetAccessKeyInfoRequest, Aws::STS::Types::GetAccessKeyInfoResponse, Aws::STS::Types::GetCallerIdentityResponse, Aws::STS::Types::GetFederationTokenRequest, Aws::STS::Types::GetFederationTokenResponse, Aws::STS::Types::GetSessionTokenRequest, Aws::STS::Types::GetSessionTokenResponse, Aws::STS::Types::IDPCommunicationErrorException, Aws::STS::Types::IDPRejectedClaimException, Aws::STS::Types::InvalidAuthorizationMessageException, Aws::STS::Types::InvalidIdentityTokenException, Aws::STS::Types::MalformedPolicyDocumentException, Aws::STS::Types::PackedPolicyTooLargeException, Aws::STS::Types::PolicyDescriptorType, Aws::STS::Types::ProvidedContext, Aws::STS::Types::RegionDisabledException, Aws::STS::Types::Tag
- Defined in:
- lib/aws-sdk-core/structure.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Modules: Union
Class Method Summary collapse
- .included(base_class) ⇒ Object private
- .new(*args) ⇒ Object private
Instance Method Summary collapse
-
#empty? ⇒ Boolean
private
Returns ‘true` if all of the member values are `nil`.
- #initialize(values = {}) ⇒ Object private
-
#key?(member_name) ⇒ Boolean
private
Returns ‘true` if this structure has a value set for the given member.
-
#to_h(obj = self, options = {}) ⇒ Hash
(also: #to_hash)
private
Deeply converts the Structure into a hash.
-
#to_s(obj = self) ⇒ Object
private
Wraps the default #to_s logic with filtering of sensitive parameters.
Class Method Details
.included(base_class) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
70 71 72 |
# File 'lib/aws-sdk-core/structure.rb', line 70 def self.included(base_class) base_class.send(:undef_method, :each) end |
.new(*args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 62 63 64 65 66 67 |
# File 'lib/aws-sdk-core/structure.rb', line 59 def new(*args) if args.empty? Aws::EmptyStructure else struct = Struct.new(*args) struct.send(:include, Aws::Structure) struct end end |
Instance Method Details
#empty? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns ‘true` if all of the member values are `nil`.
20 21 22 |
# File 'lib/aws-sdk-core/structure.rb', line 20 def empty? values.compact == [] end |
#initialize(values = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 10 11 |
# File 'lib/aws-sdk-core/structure.rb', line 7 def initialize(values = {}) values.each do |k, v| self[k] = v end end |
#key?(member_name) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns ‘true` if this structure has a value set for the given member.
15 16 17 |
# File 'lib/aws-sdk-core/structure.rb', line 15 def key?(member_name) !self[member_name].nil? end |
#to_h(obj = self, options = {}) ⇒ Hash Also known as: to_hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Deeply converts the Structure into a hash. Structure members that are ‘nil` are omitted from the resultant hash.
You can call #orig_to_h to get vanilla #to_h behavior as defined in stdlib Struct.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/aws-sdk-core/structure.rb', line 31 def to_h(obj = self, = {}) case obj when Struct obj.each_pair.with_object({}) do |(member, value), hash| member = member.to_s if [:as_json] hash[member] = to_hash(value, ) unless value.nil? end when Hash obj.each.with_object({}) do |(key, value), hash| key = key.to_s if [:as_json] hash[key] = to_hash(value, ) end when Array obj.collect { |value| to_hash(value, ) } else obj end end |
#to_s(obj = self) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Wraps the default #to_s logic with filtering of sensitive parameters.
52 53 54 |
# File 'lib/aws-sdk-core/structure.rb', line 52 def to_s(obj = self) Aws::Log::ParamFilter.new.filter(obj, obj.class).to_s end |