class Cumulus::S3::DefaultEncryptionConfig

Attributes

algorithm[R]
kms_master_key_id[R]

Public Class Methods

new(json = nil) click to toggle source

Public: Constructor

json - a hash representing the JSON configuration.

# File lib/s3/models/DefaultEncryptionConfig.rb, line 12
def initialize(json = nil)
  if json
    @algorithm = json["algorithm"]
    @kms_master_key_id = json["kms_master_key_id"]
  end
end

Public Instance Methods

!=(other) click to toggle source
# File lib/s3/models/DefaultEncryptionConfig.rb, line 54
def !=(other)
  !(self == other)
end
==(other) click to toggle source
# File lib/s3/models/DefaultEncryptionConfig.rb, line 50
def ==(other)
  other.is_a?(DefaultEncryptionConfig) && @algorithm == other.algorithm && @kms_master_key_id == other.kms_master_key_id
end
diff(aws) click to toggle source
# File lib/s3/models/DefaultEncryptionConfig.rb, line 33
def diff(aws)
  diffs = []
  if @algorithm != aws.algorithm
    diffs << DefaultEncryptionDiff.new(DefaultEncryptionChange::ALGORITHM, aws, self)
  end
  if @kms_master_key_id != aws.kms_master_key_id
    diffs << DefaultEncryptionDiff.new(DefaultEncryptionChange::KMS_KEY, aws, self)
  end

  diffs
end
populate!(aws) click to toggle source
# File lib/s3/models/DefaultEncryptionConfig.rb, line 45
def populate!(aws)
  @algorithm = aws.sse_algorithm
  @kms_master_key_id = aws.kms_master_key_id
end
to_aws() click to toggle source
# File lib/s3/models/DefaultEncryptionConfig.rb, line 19
def to_aws
  {
    sse_algorithm: @algorithm,
    kms_master_key_id: @kms_master_key_id
  }
end
to_h() click to toggle source
# File lib/s3/models/DefaultEncryptionConfig.rb, line 26
def to_h
  {
    "algorithm" => @algorithm,
    "kms_master_key_id" => @kms_master_key_id
  }
end