/*
* 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 codebuild-2016-10-06.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.CodeBuild.Model
{
///
/// Information about a webhook that connects repository events to a build project in
/// CodeBuild.
///
public partial class Webhook
{
private string _branchFilter;
private WebhookBuildType _buildType;
private List> _filterGroups = new List>();
private DateTime? _lastModifiedSecret;
private string _payloadUrl;
private string _secret;
private string _url;
///
/// Gets and sets the property BranchFilter.
///
/// A regular expression used to determine which repository branches are built when a
/// webhook is triggered. If the name of a branch matches the regular expression, then
/// it is built. If branchFilter
is empty, then all branches are built.
///
///
///
/// It is recommended that you use filterGroups
instead of branchFilter
.
///
///
///
///
public string BranchFilter
{
get { return this._branchFilter; }
set { this._branchFilter = value; }
}
// Check to see if BranchFilter property is set
internal bool IsSetBranchFilter()
{
return this._branchFilter != null;
}
///
/// Gets and sets the property BuildType.
///
/// Specifies the type of build this webhook will trigger.
///
///
public WebhookBuildType BuildType
{
get { return this._buildType; }
set { this._buildType = value; }
}
// Check to see if BuildType property is set
internal bool IsSetBuildType()
{
return this._buildType != null;
}
///
/// Gets and sets the property FilterGroups.
///
/// An array of arrays of WebhookFilter
objects used to determine which webhooks
/// are triggered. At least one WebhookFilter
in the array must specify EVENT
/// as its type
.
///
///
///
/// For a build to be triggered, at least one filter group in the filterGroups
/// array must pass. For a filter group to pass, each of its filters must pass.
///
///
public List> FilterGroups
{
get { return this._filterGroups; }
set { this._filterGroups = value; }
}
// Check to see if FilterGroups property is set
internal bool IsSetFilterGroups()
{
return this._filterGroups != null && this._filterGroups.Count > 0;
}
///
/// Gets and sets the property LastModifiedSecret.
///
/// A timestamp that indicates the last time a repository's secret token was modified.
///
///
///
public DateTime LastModifiedSecret
{
get { return this._lastModifiedSecret.GetValueOrDefault(); }
set { this._lastModifiedSecret = value; }
}
// Check to see if LastModifiedSecret property is set
internal bool IsSetLastModifiedSecret()
{
return this._lastModifiedSecret.HasValue;
}
///
/// Gets and sets the property PayloadUrl.
///
/// The CodeBuild endpoint where webhook events are sent.
///
///
[AWSProperty(Min=1)]
public string PayloadUrl
{
get { return this._payloadUrl; }
set { this._payloadUrl = value; }
}
// Check to see if PayloadUrl property is set
internal bool IsSetPayloadUrl()
{
return this._payloadUrl != null;
}
///
/// Gets and sets the property Secret.
///
/// The secret token of the associated repository.
///
///
///
/// A Bitbucket webhook does not support secret
.
///
///
///
[AWSProperty(Min=1)]
public string Secret
{
get { return this._secret; }
set { this._secret = value; }
}
// Check to see if Secret property is set
internal bool IsSetSecret()
{
return this._secret != null;
}
///
/// Gets and sets the property Url.
///
/// The URL to the webhook.
///
///
[AWSProperty(Min=1)]
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;
}
}
}