/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the macie2-2020-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.Macie2.Model
{
///
/// Provides statistical data and other information about an S3 bucket that Amazon Macie
/// monitors and analyzes for your account. By default, object count and storage size
/// values include data for object parts that are the result of incomplete multipart uploads.
/// For more information, see How
/// Macie monitors Amazon S3 data security in the Amazon Macie User Guide.
///
///
///
/// If an error occurs when Macie attempts to retrieve and process metadata from Amazon
/// S3 for the bucket or the bucket's objects, the value for the versioning property is
/// false and the value for most other properties is null. Key exceptions are accountId,
/// bucketArn, bucketCreatedAt, bucketName, lastUpdated, and region. To identify the cause
/// of the error, refer to the errorCode and errorMessage values.
///
///
public partial class BucketMetadata
{
private string _accountId;
private AllowsUnencryptedObjectUploads _allowsUnencryptedObjectUploads;
private string _bucketArn;
private DateTime? _bucketCreatedAt;
private string _bucketName;
private long? _classifiableObjectCount;
private long? _classifiableSizeInBytes;
private BucketMetadataErrorCode _errorCode;
private string _errorMessage;
private JobDetails _jobDetails;
private DateTime? _lastAutomatedDiscoveryTime;
private DateTime? _lastUpdated;
private long? _objectCount;
private ObjectCountByEncryptionType _objectCountByEncryptionType;
private BucketPublicAccess _publicAccess;
private string _region;
private ReplicationDetails _replicationDetails;
private int? _sensitivityScore;
private BucketServerSideEncryption _serverSideEncryption;
private SharedAccess _sharedAccess;
private long? _sizeInBytes;
private long? _sizeInBytesCompressed;
private List _tags = new List();
private ObjectLevelStatistics _unclassifiableObjectCount;
private ObjectLevelStatistics _unclassifiableObjectSizeInBytes;
private bool? _versioning;
///
/// Gets and sets the property AccountId.
///
/// The unique identifier for the Amazon Web Services account that owns the bucket.
///
///
public string AccountId
{
get { return this._accountId; }
set { this._accountId = value; }
}
// Check to see if AccountId property is set
internal bool IsSetAccountId()
{
return this._accountId != null;
}
///
/// Gets and sets the property AllowsUnencryptedObjectUploads.
///
/// Specifies whether the bucket policy for the bucket requires server-side encryption
/// of objects when objects are added to the bucket. Possible values are:
///
/// -
///
/// FALSE - The bucket policy requires server-side encryption of new objects. PutObject
/// requests must include a valid server-side encryption header.
///
///
-
///
/// TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't
/// require server-side encryption of new objects. If a bucket policy exists, it doesn't
/// require PutObject requests to include a valid server-side encryption header.
///
///
-
///
/// UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side
/// encryption of new objects.
///
///
///
/// Valid server-side encryption headers are: x-amz-server-side-encryption with a value
/// of AES256 or aws:kms, and x-amz-server-side-encryption-customer-algorithm with a value
/// of AES256.
///
///
public AllowsUnencryptedObjectUploads AllowsUnencryptedObjectUploads
{
get { return this._allowsUnencryptedObjectUploads; }
set { this._allowsUnencryptedObjectUploads = value; }
}
// Check to see if AllowsUnencryptedObjectUploads property is set
internal bool IsSetAllowsUnencryptedObjectUploads()
{
return this._allowsUnencryptedObjectUploads != null;
}
///
/// Gets and sets the property BucketArn.
///
/// The Amazon Resource Name (ARN) of the bucket.
///
///
public string BucketArn
{
get { return this._bucketArn; }
set { this._bucketArn = value; }
}
// Check to see if BucketArn property is set
internal bool IsSetBucketArn()
{
return this._bucketArn != null;
}
///
/// Gets and sets the property BucketCreatedAt.
///
/// The date and time, in UTC and extended ISO 8601 format, when the bucket was created.
/// This value can also indicate when changes such as edits to the bucket's policy were
/// most recently made to the bucket.
///
///
public DateTime BucketCreatedAt
{
get { return this._bucketCreatedAt.GetValueOrDefault(); }
set { this._bucketCreatedAt = value; }
}
// Check to see if BucketCreatedAt property is set
internal bool IsSetBucketCreatedAt()
{
return this._bucketCreatedAt.HasValue;
}
///
/// Gets and sets the property BucketName.
///
/// The name of the bucket.
///
///
public string BucketName
{
get { return this._bucketName; }
set { this._bucketName = value; }
}
// Check to see if BucketName property is set
internal bool IsSetBucketName()
{
return this._bucketName != null;
}
///
/// Gets and sets the property ClassifiableObjectCount.
///
/// The total number of objects that Amazon Macie can analyze in the bucket. These objects
/// use a supported storage class and have a file name extension for a supported file
/// or storage format.
///
///
public long ClassifiableObjectCount
{
get { return this._classifiableObjectCount.GetValueOrDefault(); }
set { this._classifiableObjectCount = value; }
}
// Check to see if ClassifiableObjectCount property is set
internal bool IsSetClassifiableObjectCount()
{
return this._classifiableObjectCount.HasValue;
}
///
/// Gets and sets the property ClassifiableSizeInBytes.
///
/// The total storage size, in bytes, of the objects that Amazon Macie can analyze in
/// the bucket. These objects use a supported storage class and have a file name extension
/// for a supported file or storage format.
///
///
///
/// If versioning is enabled for the bucket, Macie calculates this value based on the
/// size of the latest version of each applicable object in the bucket. This value doesn't
/// reflect the storage size of all versions of each applicable object in the bucket.
///
///
public long ClassifiableSizeInBytes
{
get { return this._classifiableSizeInBytes.GetValueOrDefault(); }
set { this._classifiableSizeInBytes = value; }
}
// Check to see if ClassifiableSizeInBytes property is set
internal bool IsSetClassifiableSizeInBytes()
{
return this._classifiableSizeInBytes.HasValue;
}
///
/// Gets and sets the property ErrorCode.
///
/// The error code for an error that prevented Amazon Macie from retrieving and processing
/// information about the bucket and the bucket's objects. If this value is ACCESS_DENIED,
/// Macie doesn't have permission to retrieve the information. For example, the bucket
/// has a restrictive bucket policy and Amazon S3 denied the request. If this value is
/// null, Macie was able to retrieve and process the information.
///
///
public BucketMetadataErrorCode ErrorCode
{
get { return this._errorCode; }
set { this._errorCode = value; }
}
// Check to see if ErrorCode property is set
internal bool IsSetErrorCode()
{
return this._errorCode != null;
}
///
/// Gets and sets the property ErrorMessage.
///
/// A brief description of the error (errorCode) that prevented Amazon Macie from retrieving
/// and processing information about the bucket and the bucket's objects. This value is
/// null if Macie was able to retrieve and process the information.
///
///
public string ErrorMessage
{
get { return this._errorMessage; }
set { this._errorMessage = value; }
}
// Check to see if ErrorMessage property is set
internal bool IsSetErrorMessage()
{
return this._errorMessage != null;
}
///
/// Gets and sets the property JobDetails.
///
/// Specifies whether any one-time or recurring classification jobs are configured to
/// analyze data in the bucket, and, if so, the details of the job that ran most recently.
///
///
public JobDetails JobDetails
{
get { return this._jobDetails; }
set { this._jobDetails = value; }
}
// Check to see if JobDetails property is set
internal bool IsSetJobDetails()
{
return this._jobDetails != null;
}
///
/// Gets and sets the property LastAutomatedDiscoveryTime.
///
/// The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently
/// analyzed data in the bucket while performing automated sensitive data discovery for
/// your account. This value is null if automated sensitive data discovery is currently
/// disabled for your account.
///
///
public DateTime LastAutomatedDiscoveryTime
{
get { return this._lastAutomatedDiscoveryTime.GetValueOrDefault(); }
set { this._lastAutomatedDiscoveryTime = value; }
}
// Check to see if LastAutomatedDiscoveryTime property is set
internal bool IsSetLastAutomatedDiscoveryTime()
{
return this._lastAutomatedDiscoveryTime.HasValue;
}
///
/// Gets and sets the property LastUpdated.
///
/// The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently
/// retrieved bucket or object metadata from Amazon S3 for the bucket.
///
///
public DateTime LastUpdated
{
get { return this._lastUpdated.GetValueOrDefault(); }
set { this._lastUpdated = value; }
}
// Check to see if LastUpdated property is set
internal bool IsSetLastUpdated()
{
return this._lastUpdated.HasValue;
}
///
/// Gets and sets the property ObjectCount.
///
/// The total number of objects in the bucket.
///
///
public long ObjectCount
{
get { return this._objectCount.GetValueOrDefault(); }
set { this._objectCount = value; }
}
// Check to see if ObjectCount property is set
internal bool IsSetObjectCount()
{
return this._objectCount.HasValue;
}
///
/// Gets and sets the property ObjectCountByEncryptionType.
///
/// The total number of objects in the bucket, grouped by server-side encryption type.
/// This includes a grouping that reports the total number of objects that aren't encrypted
/// or use client-side encryption.
///
///
public ObjectCountByEncryptionType ObjectCountByEncryptionType
{
get { return this._objectCountByEncryptionType; }
set { this._objectCountByEncryptionType = value; }
}
// Check to see if ObjectCountByEncryptionType property is set
internal bool IsSetObjectCountByEncryptionType()
{
return this._objectCountByEncryptionType != null;
}
///
/// Gets and sets the property PublicAccess.
///
/// Specifies whether the bucket is publicly accessible due to the combination of permissions
/// settings that apply to the bucket, and provides information about those settings.
///
///
public BucketPublicAccess PublicAccess
{
get { return this._publicAccess; }
set { this._publicAccess = value; }
}
// Check to see if PublicAccess property is set
internal bool IsSetPublicAccess()
{
return this._publicAccess != null;
}
///
/// Gets and sets the property Region.
///
/// The Amazon Web Services Region that hosts the bucket.
///
///
public string Region
{
get { return this._region; }
set { this._region = value; }
}
// Check to see if Region property is set
internal bool IsSetRegion()
{
return this._region != null;
}
///
/// Gets and sets the property ReplicationDetails.
///
/// Specifies whether the bucket is configured to replicate one or more objects to buckets
/// for other Amazon Web Services accounts and, if so, which accounts.
///
///
public ReplicationDetails ReplicationDetails
{
get { return this._replicationDetails; }
set { this._replicationDetails = value; }
}
// Check to see if ReplicationDetails property is set
internal bool IsSetReplicationDetails()
{
return this._replicationDetails != null;
}
///
/// Gets and sets the property SensitivityScore.
///
/// The sensitivity score for the bucket, ranging from -1 (classification error) to 100
/// (sensitive). This value is null if automated sensitive data discovery is currently
/// disabled for your account.
///
///
public int SensitivityScore
{
get { return this._sensitivityScore.GetValueOrDefault(); }
set { this._sensitivityScore = value; }
}
// Check to see if SensitivityScore property is set
internal bool IsSetSensitivityScore()
{
return this._sensitivityScore.HasValue;
}
///
/// Gets and sets the property ServerSideEncryption.
///
/// The default server-side encryption settings for the bucket.
///
///
public BucketServerSideEncryption ServerSideEncryption
{
get { return this._serverSideEncryption; }
set { this._serverSideEncryption = value; }
}
// Check to see if ServerSideEncryption property is set
internal bool IsSetServerSideEncryption()
{
return this._serverSideEncryption != null;
}
///
/// Gets and sets the property SharedAccess.
///
/// Specifies whether the bucket is shared with another Amazon Web Services account, an
/// Amazon CloudFront origin access identity (OAI), or a CloudFront origin access control
/// (OAC). Possible values are:
///
/// -
///
/// EXTERNAL - The bucket is shared with one or more of the following or any combination
/// of the following: a CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account
/// that isn't part of your Amazon Macie organization.
///
///
-
///
/// INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that
/// are part of your Amazon Macie organization. It isn't shared with a CloudFront OAI
/// or OAC.
///
///
-
///
/// NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront
/// OAI, or a CloudFront OAC.
///
///
-
///
/// UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the
/// bucket.
///
///
///
/// An Amazon Macie organization is a set of Macie accounts that are centrally
/// managed as a group of related accounts through Organizations or by Macie invitation.
///
///
public SharedAccess SharedAccess
{
get { return this._sharedAccess; }
set { this._sharedAccess = value; }
}
// Check to see if SharedAccess property is set
internal bool IsSetSharedAccess()
{
return this._sharedAccess != null;
}
///
/// Gets and sets the property SizeInBytes.
///
/// The total storage size, in bytes, of the bucket.
///
///
///
/// If versioning is enabled for the bucket, Amazon Macie calculates this value based
/// on the size of the latest version of each object in the bucket. This value doesn't
/// reflect the storage size of all versions of each object in the bucket.
///
///
public long SizeInBytes
{
get { return this._sizeInBytes.GetValueOrDefault(); }
set { this._sizeInBytes = value; }
}
// Check to see if SizeInBytes property is set
internal bool IsSetSizeInBytes()
{
return this._sizeInBytes.HasValue;
}
///
/// Gets and sets the property SizeInBytesCompressed.
///
/// The total storage size, in bytes, of the objects that are compressed (.gz, .gzip,
/// .zip) files in the bucket.
///
///
///
/// If versioning is enabled for the bucket, Amazon Macie calculates this value based
/// on the size of the latest version of each applicable object in the bucket. This value
/// doesn't reflect the storage size of all versions of each applicable object in the
/// bucket.
///
///
public long SizeInBytesCompressed
{
get { return this._sizeInBytesCompressed.GetValueOrDefault(); }
set { this._sizeInBytesCompressed = value; }
}
// Check to see if SizeInBytesCompressed property is set
internal bool IsSetSizeInBytesCompressed()
{
return this._sizeInBytesCompressed.HasValue;
}
///
/// Gets and sets the property Tags.
///
/// An array that specifies the tags (keys and values) that are associated with the bucket.
///
///
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property UnclassifiableObjectCount.
///
/// The total number of objects that Amazon Macie can't analyze in the bucket. These objects
/// don't use a supported storage class or don't have a file name extension for a supported
/// file or storage format.
///
///
public ObjectLevelStatistics UnclassifiableObjectCount
{
get { return this._unclassifiableObjectCount; }
set { this._unclassifiableObjectCount = value; }
}
// Check to see if UnclassifiableObjectCount property is set
internal bool IsSetUnclassifiableObjectCount()
{
return this._unclassifiableObjectCount != null;
}
///
/// Gets and sets the property UnclassifiableObjectSizeInBytes.
///
/// The total storage size, in bytes, of the objects that Amazon Macie can't analyze in
/// the bucket. These objects don't use a supported storage class or don't have a file
/// name extension for a supported file or storage format.
///
///
public ObjectLevelStatistics UnclassifiableObjectSizeInBytes
{
get { return this._unclassifiableObjectSizeInBytes; }
set { this._unclassifiableObjectSizeInBytes = value; }
}
// Check to see if UnclassifiableObjectSizeInBytes property is set
internal bool IsSetUnclassifiableObjectSizeInBytes()
{
return this._unclassifiableObjectSizeInBytes != null;
}
///
/// Gets and sets the property Versioning.
///
/// Specifies whether versioning is enabled for the bucket.
///
///
public bool Versioning
{
get { return this._versioning.GetValueOrDefault(); }
set { this._versioning = value; }
}
// Check to see if Versioning property is set
internal bool IsSetVersioning()
{
return this._versioning.HasValue;
}
}
}