/* * 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 codestar-notifications-2019-10-15.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.CodeStarNotifications.Model { /// /// Container for the parameters to the CreateNotificationRule operation. /// Creates a notification rule for a resource. The rule specifies the events you want /// notifications about and the targets (such as Chatbot topics or Chatbot clients configured /// for Slack) where you want to receive them. /// public partial class CreateNotificationRuleRequest : AmazonCodeStarNotificationsRequest { private string _clientRequestToken; private DetailType _detailType; private List _eventTypeIds = new List(); private string _name; private string _resource; private NotificationRuleStatus _status; private Dictionary _tags = new Dictionary(); private List _targets = new List(); /// /// Gets and sets the property ClientRequestToken. /// /// A unique, client-generated idempotency token that, when provided in a request, ensures /// the request cannot be repeated with a changed parameter. If a request with the same /// parameters is received and a token is included, the request returns information about /// the initial request that used that token. /// /// /// /// The Amazon Web Services SDKs prepopulate client request tokens. If you are using an /// Amazon Web Services SDK, an idempotency token is created for you. /// /// /// [AWSProperty(Min=1, Max=256)] public string ClientRequestToken { get { return this._clientRequestToken; } set { this._clientRequestToken = value; } } // Check to see if ClientRequestToken property is set internal bool IsSetClientRequestToken() { return this._clientRequestToken != null; } /// /// Gets and sets the property DetailType. /// /// The level of detail to include in the notifications for this resource. BASIC /// will include only the contents of the event as it would appear in Amazon CloudWatch. /// FULL will include any supplemental information provided by AWS CodeStar /// Notifications and/or the service for the resource for which the notification is created. /// /// [AWSProperty(Required=true)] public DetailType DetailType { get { return this._detailType; } set { this._detailType = value; } } // Check to see if DetailType property is set internal bool IsSetDetailType() { return this._detailType != null; } /// /// Gets and sets the property EventTypeIds. /// /// A list of event types associated with this notification rule. For a list of allowed /// events, see EventTypeSummary. /// /// [AWSProperty(Required=true)] public List EventTypeIds { get { return this._eventTypeIds; } set { this._eventTypeIds = value; } } // Check to see if EventTypeIds property is set internal bool IsSetEventTypeIds() { return this._eventTypeIds != null && this._eventTypeIds.Count > 0; } /// /// Gets and sets the property Name. /// /// The name for the notification rule. Notification rule names must be unique in your /// Amazon Web Services account. /// /// [AWSProperty(Required=true, Sensitive=true, Min=1, Max=64)] 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 Resource. /// /// The Amazon Resource Name (ARN) of the resource to associate with the notification /// rule. Supported resources include pipelines in CodePipeline, repositories in CodeCommit, /// and build projects in CodeBuild. /// /// [AWSProperty(Required=true)] 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 Status. /// /// The status of the notification rule. The default value is ENABLED. If /// the status is set to DISABLED, notifications aren't sent for the notification /// rule. /// /// public NotificationRuleStatus 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 Tags. /// /// A list of tags to apply to this notification rule. Key names cannot start with "aws". /// /// /// public Dictionary 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 Targets. /// /// A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics /// and Chatbot clients to associate with the notification rule. /// /// [AWSProperty(Required=true, Max=10)] public List Targets { get { return this._targets; } set { this._targets = value; } } // Check to see if Targets property is set internal bool IsSetTargets() { return this._targets != null && this._targets.Count > 0; } } }