/*
* 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 lightsail-2016-11-28.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.Lightsail.Model
{
///
/// Describes an Amazon Lightsail bucket.
///
public partial class Bucket
{
private bool? _ableToUpdateBundle;
private BucketAccessLogConfig _accessLogConfig;
private AccessRules _accessRules;
private string _arn;
private string _bundleId;
private DateTime? _createdAt;
private ResourceLocation _location;
private string _name;
private string _objectVersioning;
private List _readonlyAccessAccounts = new List();
private List _resourcesReceivingAccess = new List();
private string _resourceType;
private BucketState _state;
private string _supportCode;
private List _tags = new List();
private string _url;
///
/// Gets and sets the property AbleToUpdateBundle.
///
/// Indicates whether the bundle that is currently applied to a bucket can be changed
/// to another bundle.
///
///
///
/// You can update a bucket's bundle only one time within a monthly Amazon Web Services
/// billing cycle.
///
///
///
/// Use the UpdateBucketBundle
/// action to change a bucket's bundle.
///
///
public bool AbleToUpdateBundle
{
get { return this._ableToUpdateBundle.GetValueOrDefault(); }
set { this._ableToUpdateBundle = value; }
}
// Check to see if AbleToUpdateBundle property is set
internal bool IsSetAbleToUpdateBundle()
{
return this._ableToUpdateBundle.HasValue;
}
///
/// Gets and sets the property AccessLogConfig.
///
/// An object that describes the access log configuration for the bucket.
///
///
public BucketAccessLogConfig AccessLogConfig
{
get { return this._accessLogConfig; }
set { this._accessLogConfig = value; }
}
// Check to see if AccessLogConfig property is set
internal bool IsSetAccessLogConfig()
{
return this._accessLogConfig != null;
}
///
/// Gets and sets the property AccessRules.
///
/// An object that describes the access rules of the bucket.
///
///
public AccessRules AccessRules
{
get { return this._accessRules; }
set { this._accessRules = value; }
}
// Check to see if AccessRules property is set
internal bool IsSetAccessRules()
{
return this._accessRules != null;
}
///
/// Gets and sets the property Arn.
///
/// The Amazon Resource Name (ARN) of the bucket.
///
///
public string Arn
{
get { return this._arn; }
set { this._arn = value; }
}
// Check to see if Arn property is set
internal bool IsSetArn()
{
return this._arn != null;
}
///
/// Gets and sets the property BundleId.
///
/// The ID of the bundle currently applied to the bucket.
///
///
///
/// A bucket bundle specifies the monthly cost, storage space, and data transfer quota
/// for a bucket.
///
///
///
/// Use the UpdateBucketBundle
/// action to change the bundle of a bucket.
///
///
public string BundleId
{
get { return this._bundleId; }
set { this._bundleId = value; }
}
// Check to see if BundleId property is set
internal bool IsSetBundleId()
{
return this._bundleId != null;
}
///
/// Gets and sets the property CreatedAt.
///
/// The timestamp when the distribution was created.
///
///
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 Location.
///
/// An object that describes the location of the bucket, such as the Amazon Web Services
/// Region and Availability Zone.
///
///
public ResourceLocation Location
{
get { return this._location; }
set { this._location = value; }
}
// Check to see if Location property is set
internal bool IsSetLocation()
{
return this._location != null;
}
///
/// Gets and sets the property Name.
///
/// The name of the bucket.
///
///
[AWSProperty(Min=3, Max=54)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
///
/// Gets and sets the property ObjectVersioning.
///
/// Indicates whether object versioning is enabled for the bucket.
///
///
///
/// The following options can be configured:
///
/// -
///
///
Enabled
- Object versioning is enabled.
///
/// -
///
///
Suspended
- Object versioning was previously enabled but is currently
/// suspended. Existing object versions are retained.
///
/// -
///
///
NeverEnabled
- Object versioning has never been enabled.
///
///
///
public string ObjectVersioning
{
get { return this._objectVersioning; }
set { this._objectVersioning = value; }
}
// Check to see if ObjectVersioning property is set
internal bool IsSetObjectVersioning()
{
return this._objectVersioning != null;
}
///
/// Gets and sets the property ReadonlyAccessAccounts.
///
/// An array of strings that specify the Amazon Web Services account IDs that have read-only
/// access to the bucket.
///
///
[AWSProperty(Max=10)]
public List ReadonlyAccessAccounts
{
get { return this._readonlyAccessAccounts; }
set { this._readonlyAccessAccounts = value; }
}
// Check to see if ReadonlyAccessAccounts property is set
internal bool IsSetReadonlyAccessAccounts()
{
return this._readonlyAccessAccounts != null && this._readonlyAccessAccounts.Count > 0;
}
///
/// Gets and sets the property ResourcesReceivingAccess.
///
/// An array of objects that describe Lightsail instances that have access to the bucket.
///
///
///
/// Use the SetResourceAccessForBucket
/// action to update the instances that have access to a bucket.
///
///
public List ResourcesReceivingAccess
{
get { return this._resourcesReceivingAccess; }
set { this._resourcesReceivingAccess = value; }
}
// Check to see if ResourcesReceivingAccess property is set
internal bool IsSetResourcesReceivingAccess()
{
return this._resourcesReceivingAccess != null && this._resourcesReceivingAccess.Count > 0;
}
///
/// Gets and sets the property ResourceType.
///
/// The Lightsail resource type of the bucket (for example, Bucket
).
///
///
public string 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 State.
///
/// An object that describes the state of the bucket.
///
///
public BucketState State
{
get { return this._state; }
set { this._state = value; }
}
// Check to see if State property is set
internal bool IsSetState()
{
return this._state != null;
}
///
/// Gets and sets the property SupportCode.
///
/// The support code for a bucket. Include this code in your email to support when you
/// have questions about a Lightsail bucket. This code enables our support team to look
/// up your Lightsail information more easily.
///
///
public string SupportCode
{
get { return this._supportCode; }
set { this._supportCode = value; }
}
// Check to see if SupportCode property is set
internal bool IsSetSupportCode()
{
return this._supportCode != null;
}
///
/// Gets and sets the property Tags.
///
/// The tag keys and optional values for the bucket. For more information, see Tags
/// in Amazon Lightsail in the Amazon Lightsail Developer Guide.
///
///
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 Url.
///
/// The URL of the bucket.
///
///
public string Url
{
get { return this._url; }
set { this._url = value; }
}
// Check to see if Url property is set
internal bool IsSetUrl()
{
return this._url != null;
}
}
}