/*
* 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 accessanalyzer-2019-11-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.AccessAnalyzer.Model
{
///
/// Contains information about a finding.
///
public partial class Finding
{
private List _action = new List();
private DateTime? _analyzedAt;
private Dictionary _condition = new Dictionary();
private DateTime? _createdAt;
private string _error;
private string _id;
private bool? _isPublic;
private Dictionary _principal = new Dictionary();
private string _resource;
private string _resourceOwnerAccount;
private ResourceType _resourceType;
private List _sources = new List();
private FindingStatus _status;
private DateTime? _updatedAt;
///
/// Gets and sets the property Action.
///
/// The action in the analyzed policy statement that an external principal has permission
/// to use.
///
///
public List Action
{
get { return this._action; }
set { this._action = value; }
}
// Check to see if Action property is set
internal bool IsSetAction()
{
return this._action != null && this._action.Count > 0;
}
///
/// Gets and sets the property AnalyzedAt.
///
/// The time at which the resource was analyzed.
///
///
[AWSProperty(Required=true)]
public DateTime AnalyzedAt
{
get { return this._analyzedAt.GetValueOrDefault(); }
set { this._analyzedAt = value; }
}
// Check to see if AnalyzedAt property is set
internal bool IsSetAnalyzedAt()
{
return this._analyzedAt.HasValue;
}
///
/// Gets and sets the property Condition.
///
/// The condition in the analyzed policy statement that resulted in a finding.
///
///
[AWSProperty(Required=true)]
public Dictionary Condition
{
get { return this._condition; }
set { this._condition = value; }
}
// Check to see if Condition property is set
internal bool IsSetCondition()
{
return this._condition != null && this._condition.Count > 0;
}
///
/// Gets and sets the property CreatedAt.
///
/// The time at which the finding was generated.
///
///
[AWSProperty(Required=true)]
public DateTime CreatedAt
{
get { return this._createdAt.GetValueOrDefault(); }
set { this._createdAt = value; }
}
// Check to see if CreatedAt property is set
internal bool IsSetCreatedAt()
{
return this._createdAt.HasValue;
}
///
/// Gets and sets the property Error.
///
/// An error.
///
///
public string Error
{
get { return this._error; }
set { this._error = value; }
}
// Check to see if Error property is set
internal bool IsSetError()
{
return this._error != null;
}
///
/// Gets and sets the property Id.
///
/// The ID of the finding.
///
///
[AWSProperty(Required=true)]
public string Id
{
get { return this._id; }
set { this._id = value; }
}
// Check to see if Id property is set
internal bool IsSetId()
{
return this._id != null;
}
///
/// Gets and sets the property IsPublic.
///
/// Indicates whether the policy that generated the finding allows public access to the
/// resource.
///
///
public bool IsPublic
{
get { return this._isPublic.GetValueOrDefault(); }
set { this._isPublic = value; }
}
// Check to see if IsPublic property is set
internal bool IsSetIsPublic()
{
return this._isPublic.HasValue;
}
///
/// Gets and sets the property Principal.
///
/// The external principal that access to a resource within the zone of trust.
///
///
public Dictionary Principal
{
get { return this._principal; }
set { this._principal = value; }
}
// Check to see if Principal property is set
internal bool IsSetPrincipal()
{
return this._principal != null && this._principal.Count > 0;
}
///
/// Gets and sets the property Resource.
///
/// The resource that an external principal has access to.
///
///
public string Resource
{
get { return this._resource; }
set { this._resource = value; }
}
// Check to see if Resource property is set
internal bool IsSetResource()
{
return this._resource != null;
}
///
/// Gets and sets the property ResourceOwnerAccount.
///
/// The Amazon Web Services account ID that owns the resource.
///
///
[AWSProperty(Required=true)]
public string ResourceOwnerAccount
{
get { return this._resourceOwnerAccount; }
set { this._resourceOwnerAccount = value; }
}
// Check to see if ResourceOwnerAccount property is set
internal bool IsSetResourceOwnerAccount()
{
return this._resourceOwnerAccount != null;
}
///
/// Gets and sets the property ResourceType.
///
/// The type of the resource identified in the finding.
///
///
[AWSProperty(Required=true)]
public ResourceType ResourceType
{
get { return this._resourceType; }
set { this._resourceType = value; }
}
// Check to see if ResourceType property is set
internal bool IsSetResourceType()
{
return this._resourceType != null;
}
///
/// Gets and sets the property Sources.
///
/// The sources of the finding. This indicates how the access that generated the finding
/// is granted. It is populated for Amazon S3 bucket findings.
///
///
public List Sources
{
get { return this._sources; }
set { this._sources = value; }
}
// Check to see if Sources property is set
internal bool IsSetSources()
{
return this._sources != null && this._sources.Count > 0;
}
///
/// Gets and sets the property Status.
///
/// The current status of the finding.
///
///
[AWSProperty(Required=true)]
public FindingStatus Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
///
/// Gets and sets the property UpdatedAt.
///
/// The time at which the finding was updated.
///
///
[AWSProperty(Required=true)]
public DateTime UpdatedAt
{
get { return this._updatedAt.GetValueOrDefault(); }
set { this._updatedAt = value; }
}
// Check to see if UpdatedAt property is set
internal bool IsSetUpdatedAt()
{
return this._updatedAt.HasValue;
}
}
}