repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Container for the parameters to the DescribeBudgetPerformanceHistory operation. /// Describes the history for <code>DAILY</code>, <code>MONTHLY</code>, and <code>QUARTERLY</code> /// budgets. Budget history isn't available for <code>ANNUAL</code> budgets. /// </summary> public partial class DescribeBudgetPerformanceHistoryRequest : AmazonBudgetsRequest { private string _accountId; private string _budgetName; private int? _maxResults; private string _nextToken; private TimePeriod _timePeriod; /// <summary> /// Gets and sets the property AccountId. /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property BudgetName. /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public string BudgetName { get { return this._budgetName; } set { this._budgetName = value; } } // Check to see if BudgetName property is set internal bool IsSetBudgetName() { return this._budgetName != null; } /// <summary> /// Gets and sets the property MaxResults. /// </summary> [AWSProperty(Min=1, Max=100)] public int MaxResults { get { return this._maxResults.GetValueOrDefault(); } set { this._maxResults = value; } } // Check to see if MaxResults property is set internal bool IsSetMaxResults() { return this._maxResults.HasValue; } /// <summary> /// Gets and sets the property NextToken. /// </summary> [AWSProperty(Min=0, Max=2147483647)] public string NextToken { get { return this._nextToken; } set { this._nextToken = value; } } // Check to see if NextToken property is set internal bool IsSetNextToken() { return this._nextToken != null; } /// <summary> /// Gets and sets the property TimePeriod. /// <para> /// Retrieves how often the budget went into an <code>ALARM</code> state for the specified /// time period. /// </para> /// </summary> public TimePeriod TimePeriod { get { return this._timePeriod; } set { this._timePeriod = value; } } // Check to see if TimePeriod property is set internal bool IsSetTimePeriod() { return this._timePeriod != null; } } }
128
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// This is the response object from the DescribeBudgetPerformanceHistory operation. /// </summary> public partial class DescribeBudgetPerformanceHistoryResponse : AmazonWebServiceResponse { private BudgetPerformanceHistory _budgetPerformanceHistory; private string _nextToken; /// <summary> /// Gets and sets the property BudgetPerformanceHistory. /// <para> /// The history of how often the budget has gone into an <code>ALARM</code> state. /// </para> /// /// <para> /// For <code>DAILY</code> budgets, the history saves the state of the budget for the /// last 60 days. For <code>MONTHLY</code> budgets, the history saves the state of the /// budget for the current month plus the last 12 months. For <code>QUARTERLY</code> budgets, /// the history saves the state of the budget for the last four quarters. /// </para> /// </summary> public BudgetPerformanceHistory BudgetPerformanceHistory { get { return this._budgetPerformanceHistory; } set { this._budgetPerformanceHistory = value; } } // Check to see if BudgetPerformanceHistory property is set internal bool IsSetBudgetPerformanceHistory() { return this._budgetPerformanceHistory != null; } /// <summary> /// Gets and sets the property NextToken. /// </summary> [AWSProperty(Min=0, Max=2147483647)] public string NextToken { get { return this._nextToken; } set { this._nextToken = value; } } // Check to see if NextToken property is set internal bool IsSetNextToken() { return this._nextToken != null; } } }
81
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Container for the parameters to the DescribeBudget operation. /// Describes a budget. /// /// <important> /// <para> /// The Request Syntax section shows the <code>BudgetLimit</code> syntax. For <code>PlannedBudgetLimits</code>, /// see the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_DescribeBudget.html#API_DescribeBudget_Examples">Examples</a> /// section. /// </para> /// </important> /// </summary> public partial class DescribeBudgetRequest : AmazonBudgetsRequest { private string _accountId; private string _budgetName; /// <summary> /// Gets and sets the property AccountId. /// <para> /// The <code>accountId</code> that is associated with the budget that you want a description /// of. /// </para> /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property BudgetName. /// <para> /// The name of the budget that you want a description of. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public string BudgetName { get { return this._budgetName; } set { this._budgetName = value; } } // Check to see if BudgetName property is set internal bool IsSetBudgetName() { return this._budgetName != null; } } }
88
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Response of DescribeBudget /// </summary> public partial class DescribeBudgetResponse : AmazonWebServiceResponse { private Budget _budget; /// <summary> /// Gets and sets the property Budget. /// <para> /// The description of the budget. /// </para> /// </summary> public Budget Budget { get { return this._budget; } set { this._budget = value; } } // Check to see if Budget property is set internal bool IsSetBudget() { return this._budget != null; } } }
57
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Container for the parameters to the DescribeBudgets operation. /// Lists the budgets that are associated with an account. /// /// <important> /// <para> /// The Request Syntax section shows the <code>BudgetLimit</code> syntax. For <code>PlannedBudgetLimits</code>, /// see the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_DescribeBudgets.html#API_DescribeBudgets_Examples">Examples</a> /// section. /// </para> /// </important> /// </summary> public partial class DescribeBudgetsRequest : AmazonBudgetsRequest { private string _accountId; private int? _maxResults; private string _nextToken; /// <summary> /// Gets and sets the property AccountId. /// <para> /// The <code>accountId</code> that is associated with the budgets that you want descriptions /// of. /// </para> /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property MaxResults. /// <para> /// An optional integer that represents how many entries a paginated response contains. /// The maximum is 100. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public int MaxResults { get { return this._maxResults.GetValueOrDefault(); } set { this._maxResults = value; } } // Check to see if MaxResults property is set internal bool IsSetMaxResults() { return this._maxResults.HasValue; } /// <summary> /// Gets and sets the property NextToken. /// <para> /// The pagination token that you include in your request to indicate the next set of /// results that you want to retrieve. /// </para> /// </summary> [AWSProperty(Min=0, Max=2147483647)] public string NextToken { get { return this._nextToken; } set { this._nextToken = value; } } // Check to see if NextToken property is set internal bool IsSetNextToken() { return this._nextToken != null; } } }
110
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Response of DescribeBudgets /// </summary> public partial class DescribeBudgetsResponse : AmazonWebServiceResponse { private List<Budget> _budgets = new List<Budget>(); private string _nextToken; /// <summary> /// Gets and sets the property Budgets. /// <para> /// A list of budgets. /// </para> /// </summary> public List<Budget> Budgets { get { return this._budgets; } set { this._budgets = value; } } // Check to see if Budgets property is set internal bool IsSetBudgets() { return this._budgets != null && this._budgets.Count > 0; } /// <summary> /// Gets and sets the property NextToken. /// <para> /// The pagination token in the service response that indicates the next set of results /// that you can retrieve. /// </para> /// </summary> [AWSProperty(Min=0, Max=2147483647)] public string NextToken { get { return this._nextToken; } set { this._nextToken = value; } } // Check to see if NextToken property is set internal bool IsSetNextToken() { return this._nextToken != null; } } }
78
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Container for the parameters to the DescribeNotificationsForBudget operation. /// Lists the notifications that are associated with a budget. /// </summary> public partial class DescribeNotificationsForBudgetRequest : AmazonBudgetsRequest { private string _accountId; private string _budgetName; private int? _maxResults; private string _nextToken; /// <summary> /// Gets and sets the property AccountId. /// <para> /// The <code>accountId</code> that is associated with the budget whose notifications /// you want descriptions of. /// </para> /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property BudgetName. /// <para> /// The name of the budget whose notifications you want descriptions of. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public string BudgetName { get { return this._budgetName; } set { this._budgetName = value; } } // Check to see if BudgetName property is set internal bool IsSetBudgetName() { return this._budgetName != null; } /// <summary> /// Gets and sets the property MaxResults. /// <para> /// An optional integer that represents how many entries a paginated response contains. /// The maximum is 100. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public int MaxResults { get { return this._maxResults.GetValueOrDefault(); } set { this._maxResults = value; } } // Check to see if MaxResults property is set internal bool IsSetMaxResults() { return this._maxResults.HasValue; } /// <summary> /// Gets and sets the property NextToken. /// <para> /// The pagination token that you include in your request to indicate the next set of /// results that you want to retrieve. /// </para> /// </summary> [AWSProperty(Min=0, Max=2147483647)] public string NextToken { get { return this._nextToken; } set { this._nextToken = value; } } // Check to see if NextToken property is set internal bool IsSetNextToken() { return this._nextToken != null; } } }
122
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Response of GetNotificationsForBudget /// </summary> public partial class DescribeNotificationsForBudgetResponse : AmazonWebServiceResponse { private string _nextToken; private List<Notification> _notifications = new List<Notification>(); /// <summary> /// Gets and sets the property NextToken. /// <para> /// The pagination token in the service response that indicates the next set of results /// that you can retrieve. /// </para> /// </summary> [AWSProperty(Min=0, Max=2147483647)] public string NextToken { get { return this._nextToken; } set { this._nextToken = value; } } // Check to see if NextToken property is set internal bool IsSetNextToken() { return this._nextToken != null; } /// <summary> /// Gets and sets the property Notifications. /// <para> /// A list of notifications that are associated with a budget. /// </para> /// </summary> public List<Notification> Notifications { get { return this._notifications; } set { this._notifications = value; } } // Check to see if Notifications property is set internal bool IsSetNotifications() { return this._notifications != null && this._notifications.Count > 0; } } }
78
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Container for the parameters to the DescribeSubscribersForNotification operation. /// Lists the subscribers that are associated with a notification. /// </summary> public partial class DescribeSubscribersForNotificationRequest : AmazonBudgetsRequest { private string _accountId; private string _budgetName; private int? _maxResults; private string _nextToken; private Notification _notification; /// <summary> /// Gets and sets the property AccountId. /// <para> /// The <code>accountId</code> that is associated with the budget whose subscribers you /// want descriptions of. /// </para> /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property BudgetName. /// <para> /// The name of the budget whose subscribers you want descriptions of. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public string BudgetName { get { return this._budgetName; } set { this._budgetName = value; } } // Check to see if BudgetName property is set internal bool IsSetBudgetName() { return this._budgetName != null; } /// <summary> /// Gets and sets the property MaxResults. /// <para> /// An optional integer that represents how many entries a paginated response contains. /// The maximum is 100. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public int MaxResults { get { return this._maxResults.GetValueOrDefault(); } set { this._maxResults = value; } } // Check to see if MaxResults property is set internal bool IsSetMaxResults() { return this._maxResults.HasValue; } /// <summary> /// Gets and sets the property NextToken. /// <para> /// The pagination token that you include in your request to indicate the next set of /// results that you want to retrieve. /// </para> /// </summary> [AWSProperty(Min=0, Max=2147483647)] public string NextToken { get { return this._nextToken; } set { this._nextToken = value; } } // Check to see if NextToken property is set internal bool IsSetNextToken() { return this._nextToken != null; } /// <summary> /// Gets and sets the property Notification. /// <para> /// The notification whose subscribers you want to list. /// </para> /// </summary> [AWSProperty(Required=true)] public Notification Notification { get { return this._notification; } set { this._notification = value; } } // Check to see if Notification property is set internal bool IsSetNotification() { return this._notification != null; } } }
142
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Response of DescribeSubscribersForNotification /// </summary> public partial class DescribeSubscribersForNotificationResponse : AmazonWebServiceResponse { private string _nextToken; private List<Subscriber> _subscribers = new List<Subscriber>(); /// <summary> /// Gets and sets the property NextToken. /// <para> /// The pagination token in the service response that indicates the next set of results /// that you can retrieve. /// </para> /// </summary> [AWSProperty(Min=0, Max=2147483647)] public string NextToken { get { return this._nextToken; } set { this._nextToken = value; } } // Check to see if NextToken property is set internal bool IsSetNextToken() { return this._nextToken != null; } /// <summary> /// Gets and sets the property Subscribers. /// <para> /// A list of subscribers that are associated with a notification. /// </para> /// </summary> [AWSProperty(Min=1, Max=11)] public List<Subscriber> Subscribers { get { return this._subscribers; } set { this._subscribers = value; } } // Check to see if Subscribers property is set internal bool IsSetSubscribers() { return this._subscribers != null && this._subscribers.Count > 0; } } }
79
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The budget name already exists. Budget names must be unique within an account. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class DuplicateRecordException : AmazonBudgetsException { /// <summary> /// Constructs a new DuplicateRecordException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public DuplicateRecordException(string message) : base(message) {} /// <summary> /// Construct instance of DuplicateRecordException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public DuplicateRecordException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of DuplicateRecordException /// </summary> /// <param name="innerException"></param> public DuplicateRecordException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of DuplicateRecordException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public DuplicateRecordException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of DuplicateRecordException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public DuplicateRecordException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, errorType, errorCode, requestId, statusCode) {} #if !NETSTANDARD /// <summary> /// Constructs a new instance of the DuplicateRecordException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected DuplicateRecordException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } /// <summary> /// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception> #if BCL35 [System.Security.Permissions.SecurityPermission( System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] #endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { base.GetObjectData(info, context); } #endif } }
124
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Container for the parameters to the ExecuteBudgetAction operation. /// Executes a budget action. /// </summary> public partial class ExecuteBudgetActionRequest : AmazonBudgetsRequest { private string _accountId; private string _actionId; private string _budgetName; private ExecutionType _executionType; /// <summary> /// Gets and sets the property AccountId. /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property ActionId. /// <para> /// A system-generated universally unique identifier (UUID) for the action. /// </para> /// </summary> [AWSProperty(Required=true, Min=36, Max=36)] public string ActionId { get { return this._actionId; } set { this._actionId = value; } } // Check to see if ActionId property is set internal bool IsSetActionId() { return this._actionId != null; } /// <summary> /// Gets and sets the property BudgetName. /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public string BudgetName { get { return this._budgetName; } set { this._budgetName = value; } } // Check to see if BudgetName property is set internal bool IsSetBudgetName() { return this._budgetName != null; } /// <summary> /// Gets and sets the property ExecutionType. /// <para> /// The type of execution. /// </para> /// </summary> [AWSProperty(Required=true)] public ExecutionType ExecutionType { get { return this._executionType; } set { this._executionType = value; } } // Check to see if ExecutionType property is set internal bool IsSetExecutionType() { return this._executionType != null; } } }
113
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// This is the response object from the ExecuteBudgetAction operation. /// </summary> public partial class ExecuteBudgetActionResponse : AmazonWebServiceResponse { private string _accountId; private string _actionId; private string _budgetName; private ExecutionType _executionType; /// <summary> /// Gets and sets the property AccountId. /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property ActionId. /// <para> /// A system-generated universally unique identifier (UUID) for the action. /// </para> /// </summary> [AWSProperty(Required=true, Min=36, Max=36)] public string ActionId { get { return this._actionId; } set { this._actionId = value; } } // Check to see if ActionId property is set internal bool IsSetActionId() { return this._actionId != null; } /// <summary> /// Gets and sets the property BudgetName. /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public string BudgetName { get { return this._budgetName; } set { this._budgetName = value; } } // Check to see if BudgetName property is set internal bool IsSetBudgetName() { return this._budgetName != null; } /// <summary> /// Gets and sets the property ExecutionType. /// <para> /// The type of execution. /// </para> /// </summary> [AWSProperty(Required=true)] public ExecutionType ExecutionType { get { return this._executionType; } set { this._executionType = value; } } // Check to see if ExecutionType property is set internal bool IsSetExecutionType() { return this._executionType != null; } } }
112
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The pagination token expired. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class ExpiredNextTokenException : AmazonBudgetsException { /// <summary> /// Constructs a new ExpiredNextTokenException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public ExpiredNextTokenException(string message) : base(message) {} /// <summary> /// Construct instance of ExpiredNextTokenException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public ExpiredNextTokenException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of ExpiredNextTokenException /// </summary> /// <param name="innerException"></param> public ExpiredNextTokenException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of ExpiredNextTokenException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public ExpiredNextTokenException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of ExpiredNextTokenException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public ExpiredNextTokenException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, errorType, errorCode, requestId, statusCode) {} #if !NETSTANDARD /// <summary> /// Constructs a new instance of the ExpiredNextTokenException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected ExpiredNextTokenException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } /// <summary> /// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception> #if BCL35 [System.Security.Permissions.SecurityPermission( System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] #endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { base.GetObjectData(info, context); } #endif } }
124
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The parameters that define or describe the historical data that your auto-adjusting /// budget is based on. /// </summary> public partial class HistoricalOptions { private int? _budgetAdjustmentPeriod; private int? _lookBackAvailablePeriods; /// <summary> /// Gets and sets the property BudgetAdjustmentPeriod. /// <para> /// The number of budget periods included in the moving-average calculation that determines /// your auto-adjusted budget amount. The maximum value depends on the <code>TimeUnit</code> /// granularity of the budget: /// </para> /// <ul> <li> /// <para> /// For the <code>DAILY</code> granularity, the maximum value is <code>60</code>. /// </para> /// </li> <li> /// <para> /// For the <code>MONTHLY</code> granularity, the maximum value is <code>12</code>. /// </para> /// </li> <li> /// <para> /// For the <code>QUARTERLY</code> granularity, the maximum value is <code>4</code>. /// </para> /// </li> <li> /// <para> /// For the <code>ANNUALLY</code> granularity, the maximum value is <code>1</code>. /// </para> /// </li> </ul> /// </summary> [AWSProperty(Required=true, Min=1, Max=60)] public int BudgetAdjustmentPeriod { get { return this._budgetAdjustmentPeriod.GetValueOrDefault(); } set { this._budgetAdjustmentPeriod = value; } } // Check to see if BudgetAdjustmentPeriod property is set internal bool IsSetBudgetAdjustmentPeriod() { return this._budgetAdjustmentPeriod.HasValue; } /// <summary> /// Gets and sets the property LookBackAvailablePeriods. /// <para> /// The integer that describes how many budget periods in your <code>BudgetAdjustmentPeriod</code> /// are included in the calculation of your current <code>BudgetLimit</code>. If the first /// budget period in your <code>BudgetAdjustmentPeriod</code> has no cost data, then that /// budget period isn’t included in the average that determines your budget limit. /// </para> /// /// <para> /// For example, if you set <code>BudgetAdjustmentPeriod</code> as <code>4</code> quarters, /// but your account had no cost data in the first quarter, then only the last three quarters /// are included in the calculation. In this scenario, <code>LookBackAvailablePeriods</code> /// returns <code>3</code>. /// </para> /// /// <para> /// You can’t set your own <code>LookBackAvailablePeriods</code>. The value is automatically /// calculated from the <code>BudgetAdjustmentPeriod</code> and your historical cost data. /// </para> /// </summary> [AWSProperty(Min=1, Max=60)] public int LookBackAvailablePeriods { get { return this._lookBackAvailablePeriods.GetValueOrDefault(); } set { this._lookBackAvailablePeriods = value; } } // Check to see if LookBackAvailablePeriods property is set internal bool IsSetLookBackAvailablePeriods() { return this._lookBackAvailablePeriods.HasValue; } } }
113
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The Identity and Access Management (IAM) action definition details. /// </summary> public partial class IamActionDefinition { private List<string> _groups = new List<string>(); private string _policyArn; private List<string> _roles = new List<string>(); private List<string> _users = new List<string>(); /// <summary> /// Gets and sets the property Groups. /// <para> /// A list of groups to be attached. There must be at least one group. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public List<string> Groups { get { return this._groups; } set { this._groups = value; } } // Check to see if Groups property is set internal bool IsSetGroups() { return this._groups != null && this._groups.Count > 0; } /// <summary> /// Gets and sets the property PolicyArn. /// <para> /// The Amazon Resource Name (ARN) of the policy to be attached. /// </para> /// </summary> [AWSProperty(Required=true, Min=25, Max=684)] public string PolicyArn { get { return this._policyArn; } set { this._policyArn = value; } } // Check to see if PolicyArn property is set internal bool IsSetPolicyArn() { return this._policyArn != null; } /// <summary> /// Gets and sets the property Roles. /// <para> /// A list of roles to be attached. There must be at least one role. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public List<string> Roles { get { return this._roles; } set { this._roles = value; } } // Check to see if Roles property is set internal bool IsSetRoles() { return this._roles != null && this._roles.Count > 0; } /// <summary> /// Gets and sets the property Users. /// <para> /// A list of users to be attached. There must be at least one user. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public List<string> Users { get { return this._users; } set { this._users = value; } } // Check to see if Users property is set internal bool IsSetUsers() { return this._users != null && this._users.Count > 0; } } }
118
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// An error on the server occurred during the processing of your request. Try again later. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class InternalErrorException : AmazonBudgetsException { /// <summary> /// Constructs a new InternalErrorException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public InternalErrorException(string message) : base(message) {} /// <summary> /// Construct instance of InternalErrorException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public InternalErrorException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of InternalErrorException /// </summary> /// <param name="innerException"></param> public InternalErrorException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of InternalErrorException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public InternalErrorException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of InternalErrorException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public InternalErrorException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, errorType, errorCode, requestId, statusCode) {} #if !NETSTANDARD /// <summary> /// Constructs a new instance of the InternalErrorException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected InternalErrorException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } /// <summary> /// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception> #if BCL35 [System.Security.Permissions.SecurityPermission( System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] #endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { base.GetObjectData(info, context); } #endif } }
124
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The pagination token is invalid. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class InvalidNextTokenException : AmazonBudgetsException { /// <summary> /// Constructs a new InvalidNextTokenException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public InvalidNextTokenException(string message) : base(message) {} /// <summary> /// Construct instance of InvalidNextTokenException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public InvalidNextTokenException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of InvalidNextTokenException /// </summary> /// <param name="innerException"></param> public InvalidNextTokenException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of InvalidNextTokenException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public InvalidNextTokenException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of InvalidNextTokenException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public InvalidNextTokenException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, errorType, errorCode, requestId, statusCode) {} #if !NETSTANDARD /// <summary> /// Constructs a new instance of the InvalidNextTokenException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected InvalidNextTokenException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } /// <summary> /// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception> #if BCL35 [System.Security.Permissions.SecurityPermission( System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] #endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { base.GetObjectData(info, context); } #endif } }
124
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// An error on the client occurred. Typically, the cause is an invalid input value. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class InvalidParameterException : AmazonBudgetsException { /// <summary> /// Constructs a new InvalidParameterException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public InvalidParameterException(string message) : base(message) {} /// <summary> /// Construct instance of InvalidParameterException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public InvalidParameterException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of InvalidParameterException /// </summary> /// <param name="innerException"></param> public InvalidParameterException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of InvalidParameterException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public InvalidParameterException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of InvalidParameterException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public InvalidParameterException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, errorType, errorCode, requestId, statusCode) {} #if !NETSTANDARD /// <summary> /// Constructs a new instance of the InvalidParameterException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected InvalidParameterException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } /// <summary> /// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception> #if BCL35 [System.Security.Permissions.SecurityPermission( System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] #endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { base.GetObjectData(info, context); } #endif } }
124
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// We can’t locate the resource that you specified. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class NotFoundException : AmazonBudgetsException { /// <summary> /// Constructs a new NotFoundException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public NotFoundException(string message) : base(message) {} /// <summary> /// Construct instance of NotFoundException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public NotFoundException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of NotFoundException /// </summary> /// <param name="innerException"></param> public NotFoundException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of NotFoundException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public NotFoundException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of NotFoundException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public NotFoundException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, errorType, errorCode, requestId, statusCode) {} #if !NETSTANDARD /// <summary> /// Constructs a new instance of the NotFoundException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected NotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } /// <summary> /// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception> #if BCL35 [System.Security.Permissions.SecurityPermission( System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] #endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { base.GetObjectData(info, context); } #endif } }
124
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// A notification that's associated with a budget. A budget can have up to ten notifications. /// /// /// /// <para> /// Each notification must have at least one subscriber. A notification can have one SNS /// subscriber and up to 10 email subscribers, for a total of 11 subscribers. /// </para> /// /// <para> /// For example, if you have a budget for 200 dollars and you want to be notified when /// you go over 160 dollars, create a notification with the following parameters: /// </para> /// <ul> <li> /// <para> /// A notificationType of <code>ACTUAL</code> /// </para> /// </li> <li> /// <para> /// A <code>thresholdType</code> of <code>PERCENTAGE</code> /// </para> /// </li> <li> /// <para> /// A <code>comparisonOperator</code> of <code>GREATER_THAN</code> /// </para> /// </li> <li> /// <para> /// A notification <code>threshold</code> of <code>80</code> /// </para> /// </li> </ul> /// </summary> public partial class Notification { private ComparisonOperator _comparisonOperator; private NotificationState _notificationState; private NotificationType _notificationType; private double? _threshold; private ThresholdType _thresholdType; /// <summary> /// Gets and sets the property ComparisonOperator. /// <para> /// The comparison that's used for this notification. /// </para> /// </summary> [AWSProperty(Required=true)] public ComparisonOperator ComparisonOperator { get { return this._comparisonOperator; } set { this._comparisonOperator = value; } } // Check to see if ComparisonOperator property is set internal bool IsSetComparisonOperator() { return this._comparisonOperator != null; } /// <summary> /// Gets and sets the property NotificationState. /// <para> /// Specifies whether this notification is in alarm. If a budget notification is in the /// <code>ALARM</code> state, you passed the set threshold for the budget. /// </para> /// </summary> public NotificationState NotificationState { get { return this._notificationState; } set { this._notificationState = value; } } // Check to see if NotificationState property is set internal bool IsSetNotificationState() { return this._notificationState != null; } /// <summary> /// Gets and sets the property NotificationType. /// <para> /// Specifies whether the notification is for how much you have spent (<code>ACTUAL</code>) /// or for how much that you're forecasted to spend (<code>FORECASTED</code>). /// </para> /// </summary> [AWSProperty(Required=true)] public NotificationType NotificationType { get { return this._notificationType; } set { this._notificationType = value; } } // Check to see if NotificationType property is set internal bool IsSetNotificationType() { return this._notificationType != null; } /// <summary> /// Gets and sets the property Threshold. /// <para> /// The threshold that's associated with a notification. Thresholds are always a percentage, /// and many customers find value being alerted between 50% - 200% of the budgeted amount. /// The maximum limit for your threshold is 1,000,000% above the budgeted amount. /// </para> /// </summary> [AWSProperty(Required=true, Min=0, Max=15000000000000)] public double Threshold { get { return this._threshold.GetValueOrDefault(); } set { this._threshold = value; } } // Check to see if Threshold property is set internal bool IsSetThreshold() { return this._threshold.HasValue; } /// <summary> /// Gets and sets the property ThresholdType. /// <para> /// The type of threshold for a notification. For <code>ABSOLUTE_VALUE</code> thresholds, /// Amazon Web Services notifies you when you go over or are forecasted to go over your /// total cost threshold. For <code>PERCENTAGE</code> thresholds, Amazon Web Services /// notifies you when you go over or are forecasted to go over a certain percentage of /// your forecasted spend. For example, if you have a budget for 200 dollars and you have /// a <code>PERCENTAGE</code> threshold of 80%, Amazon Web Services notifies you when /// you go over 160 dollars. /// </para> /// </summary> public ThresholdType ThresholdType { get { return this._thresholdType; } set { this._thresholdType = value; } } // Check to see if ThresholdType property is set internal bool IsSetThresholdType() { return this._thresholdType != null; } } }
175
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// A notification with subscribers. A notification can have one SNS subscriber and up /// to 10 email subscribers, for a total of 11 subscribers. /// </summary> public partial class NotificationWithSubscribers { private Notification _notification; private List<Subscriber> _subscribers = new List<Subscriber>(); /// <summary> /// Gets and sets the property Notification. /// <para> /// The notification that's associated with a budget. /// </para> /// </summary> [AWSProperty(Required=true)] public Notification Notification { get { return this._notification; } set { this._notification = value; } } // Check to see if Notification property is set internal bool IsSetNotification() { return this._notification != null; } /// <summary> /// Gets and sets the property Subscribers. /// <para> /// A list of subscribers who are subscribed to this notification. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=11)] public List<Subscriber> Subscribers { get { return this._subscribers; } set { this._subscribers = value; } } // Check to see if Subscribers property is set internal bool IsSetSubscribers() { return this._subscribers != null && this._subscribers.Count > 0; } } }
79
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The request was received and recognized by the server, but the server rejected that /// particular method for the requested resource. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class ResourceLockedException : AmazonBudgetsException { /// <summary> /// Constructs a new ResourceLockedException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public ResourceLockedException(string message) : base(message) {} /// <summary> /// Construct instance of ResourceLockedException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public ResourceLockedException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of ResourceLockedException /// </summary> /// <param name="innerException"></param> public ResourceLockedException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of ResourceLockedException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public ResourceLockedException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of ResourceLockedException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public ResourceLockedException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, errorType, errorCode, requestId, statusCode) {} #if !NETSTANDARD /// <summary> /// Constructs a new instance of the ResourceLockedException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected ResourceLockedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } /// <summary> /// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception> #if BCL35 [System.Security.Permissions.SecurityPermission( System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] #endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { base.GetObjectData(info, context); } #endif } }
125
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The service control policies (SCP) action definition details. /// </summary> public partial class ScpActionDefinition { private string _policyId; private List<string> _targetIds = new List<string>(); /// <summary> /// Gets and sets the property PolicyId. /// <para> /// The policy ID attached. /// </para> /// </summary> [AWSProperty(Required=true, Min=10, Max=130)] public string PolicyId { get { return this._policyId; } set { this._policyId = value; } } // Check to see if PolicyId property is set internal bool IsSetPolicyId() { return this._policyId != null; } /// <summary> /// Gets and sets the property TargetIds. /// <para> /// A list of target IDs. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public List<string> TargetIds { get { return this._targetIds; } set { this._targetIds = value; } } // Check to see if TargetIds property is set internal bool IsSetTargetIds() { return this._targetIds != null && this._targetIds.Count > 0; } } }
78
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The amount of cost or usage that's measured for a budget. /// /// /// <para> /// For example, a <code>Spend</code> for <code>3 GB</code> of S3 usage has the following /// parameters: /// </para> /// <ul> <li> /// <para> /// An <code>Amount</code> of <code>3</code> /// </para> /// </li> <li> /// <para> /// A <code>unit</code> of <code>GB</code> /// </para> /// </li> </ul> /// </summary> public partial class Spend { private decimal? _amount; private string _unit; /// <summary> /// Gets and sets the property Amount. /// <para> /// The cost or usage amount that's associated with a budget forecast, actual spend, or /// budget threshold. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=2147483647)] public decimal Amount { get { return this._amount.GetValueOrDefault(); } set { this._amount = value; } } // Check to see if Amount property is set internal bool IsSetAmount() { return this._amount.HasValue; } /// <summary> /// Gets and sets the property Unit. /// <para> /// The unit of measurement that's used for the budget forecast, actual spend, or budget /// threshold, such as USD or GBP. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=2147483647)] public string Unit { get { return this._unit; } set { this._unit = value; } } // Check to see if Unit property is set internal bool IsSetUnit() { return this._unit != null; } } }
95
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The Amazon Web Services Systems Manager (SSM) action definition details. /// </summary> public partial class SsmActionDefinition { private ActionSubType _actionSubType; private List<string> _instanceIds = new List<string>(); private string _region; /// <summary> /// Gets and sets the property ActionSubType. /// <para> /// The action subType. /// </para> /// </summary> [AWSProperty(Required=true)] public ActionSubType ActionSubType { get { return this._actionSubType; } set { this._actionSubType = value; } } // Check to see if ActionSubType property is set internal bool IsSetActionSubType() { return this._actionSubType != null; } /// <summary> /// Gets and sets the property InstanceIds. /// <para> /// The EC2 and RDS instance IDs. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public List<string> InstanceIds { get { return this._instanceIds; } set { this._instanceIds = value; } } // Check to see if InstanceIds property is set internal bool IsSetInstanceIds() { return this._instanceIds != null && this._instanceIds.Count > 0; } /// <summary> /// Gets and sets the property Region. /// <para> /// The Region to run the SSM document. /// </para> /// </summary> [AWSProperty(Required=true, Min=9, Max=20)] 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; } } }
98
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The subscriber to a budget notification. The subscriber consists of a subscription /// type and either an Amazon SNS topic or an email address. /// /// /// <para> /// For example, an email subscriber has the following parameters: /// </para> /// <ul> <li> /// <para> /// A <code>subscriptionType</code> of <code>EMAIL</code> /// </para> /// </li> <li> /// <para> /// An <code>address</code> of <code>[email protected]</code> /// </para> /// </li> </ul> /// </summary> public partial class Subscriber { private string _address; private SubscriptionType _subscriptionType; /// <summary> /// Gets and sets the property Address. /// <para> /// The address that Amazon Web Services sends budget notifications to, either an SNS /// topic or an email. /// </para> /// /// <para> /// When you create a subscriber, the value of <code>Address</code> can't contain line /// breaks. /// </para> /// </summary> [AWSProperty(Required=true, Sensitive=true, Min=1, Max=2147483647)] public string Address { get { return this._address; } set { this._address = value; } } // Check to see if Address property is set internal bool IsSetAddress() { return this._address != null; } /// <summary> /// Gets and sets the property SubscriptionType. /// <para> /// The type of notification that Amazon Web Services sends to a subscriber. /// </para> /// </summary> [AWSProperty(Required=true)] public SubscriptionType SubscriptionType { get { return this._subscriptionType; } set { this._subscriptionType = value; } } // Check to see if SubscriptionType property is set internal bool IsSetSubscriptionType() { return this._subscriptionType != null; } } }
99
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The number of API requests has exceeded the maximum allowed API request throttling /// limit for the account. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class ThrottlingException : AmazonBudgetsException { /// <summary> /// Constructs a new ThrottlingException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public ThrottlingException(string message) : base(message) {} /// <summary> /// Construct instance of ThrottlingException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public ThrottlingException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of ThrottlingException /// </summary> /// <param name="innerException"></param> public ThrottlingException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of ThrottlingException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public ThrottlingException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of ThrottlingException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public ThrottlingException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, errorType, errorCode, requestId, statusCode) {} #if !NETSTANDARD /// <summary> /// Constructs a new instance of the ThrottlingException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected ThrottlingException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } /// <summary> /// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception> #if BCL35 [System.Security.Permissions.SecurityPermission( System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] #endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { base.GetObjectData(info, context); } #endif } }
125
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// The period of time that's covered by a budget. The period has a start date and an /// end date. The start date must come before the end date. There are no restrictions /// on the end date. /// </summary> public partial class TimePeriod { private DateTime? _end; private DateTime? _start; /// <summary> /// Gets and sets the property End. /// <para> /// The end date for a budget. If you didn't specify an end date, Amazon Web Services /// set your end date to <code>06/15/87 00:00 UTC</code>. The defaults are the same for /// the Billing and Cost Management console and the API. /// </para> /// /// <para> /// After the end date, Amazon Web Services deletes the budget and all the associated /// notifications and subscribers. You can change your end date with the <code>UpdateBudget</code> /// operation. /// </para> /// </summary> public DateTime End { get { return this._end.GetValueOrDefault(); } set { this._end = value; } } // Check to see if End property is set internal bool IsSetEnd() { return this._end.HasValue; } /// <summary> /// Gets and sets the property Start. /// <para> /// The start date for a budget. If you created your budget and didn't specify a start /// date, Amazon Web Services defaults to the start of your chosen time period (DAILY, /// MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January /// 24, 2018, chose <code>DAILY</code>, and didn't set a start date, Amazon Web Services /// set your start date to <code>01/24/18 00:00 UTC</code>. If you chose <code>MONTHLY</code>, /// Amazon Web Services set your start date to <code>01/01/18 00:00 UTC</code>. The defaults /// are the same for the Billing and Cost Management console and the API. /// </para> /// /// <para> /// You can change your start date with the <code>UpdateBudget</code> operation. /// </para> /// </summary> public DateTime Start { get { return this._start.GetValueOrDefault(); } set { this._start = value; } } // Check to see if Start property is set internal bool IsSetStart() { return this._start.HasValue; } } }
96
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Container for the parameters to the UpdateBudgetAction operation. /// Updates a budget action. /// </summary> public partial class UpdateBudgetActionRequest : AmazonBudgetsRequest { private string _accountId; private string _actionId; private ActionThreshold _actionThreshold; private ApprovalModel _approvalModel; private string _budgetName; private Definition _definition; private string _executionRoleArn; private NotificationType _notificationType; private List<Subscriber> _subscribers = new List<Subscriber>(); /// <summary> /// Gets and sets the property AccountId. /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property ActionId. /// <para> /// A system-generated universally unique identifier (UUID) for the action. /// </para> /// </summary> [AWSProperty(Required=true, Min=36, Max=36)] public string ActionId { get { return this._actionId; } set { this._actionId = value; } } // Check to see if ActionId property is set internal bool IsSetActionId() { return this._actionId != null; } /// <summary> /// Gets and sets the property ActionThreshold. /// </summary> public ActionThreshold ActionThreshold { get { return this._actionThreshold; } set { this._actionThreshold = value; } } // Check to see if ActionThreshold property is set internal bool IsSetActionThreshold() { return this._actionThreshold != null; } /// <summary> /// Gets and sets the property ApprovalModel. /// <para> /// This specifies if the action needs manual or automatic approval. /// </para> /// </summary> public ApprovalModel ApprovalModel { get { return this._approvalModel; } set { this._approvalModel = value; } } // Check to see if ApprovalModel property is set internal bool IsSetApprovalModel() { return this._approvalModel != null; } /// <summary> /// Gets and sets the property BudgetName. /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public string BudgetName { get { return this._budgetName; } set { this._budgetName = value; } } // Check to see if BudgetName property is set internal bool IsSetBudgetName() { return this._budgetName != null; } /// <summary> /// Gets and sets the property Definition. /// </summary> public Definition Definition { get { return this._definition; } set { this._definition = value; } } // Check to see if Definition property is set internal bool IsSetDefinition() { return this._definition != null; } /// <summary> /// Gets and sets the property ExecutionRoleArn. /// <para> /// The role passed for action execution and reversion. Roles and actions must be in /// the same account. /// </para> /// </summary> [AWSProperty(Min=32, Max=618)] public string ExecutionRoleArn { get { return this._executionRoleArn; } set { this._executionRoleArn = value; } } // Check to see if ExecutionRoleArn property is set internal bool IsSetExecutionRoleArn() { return this._executionRoleArn != null; } /// <summary> /// Gets and sets the property NotificationType. /// </summary> public NotificationType NotificationType { get { return this._notificationType; } set { this._notificationType = value; } } // Check to see if NotificationType property is set internal bool IsSetNotificationType() { return this._notificationType != null; } /// <summary> /// Gets and sets the property Subscribers. /// </summary> [AWSProperty(Min=1, Max=11)] public List<Subscriber> Subscribers { get { return this._subscribers; } set { this._subscribers = value; } } // Check to see if Subscribers property is set internal bool IsSetSubscribers() { return this._subscribers != null && this._subscribers.Count > 0; } } }
198
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// This is the response object from the UpdateBudgetAction operation. /// </summary> public partial class UpdateBudgetActionResponse : AmazonWebServiceResponse { private string _accountId; private string _budgetName; private Action _newAction; private Action _oldAction; /// <summary> /// Gets and sets the property AccountId. /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property BudgetName. /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public string BudgetName { get { return this._budgetName; } set { this._budgetName = value; } } // Check to see if BudgetName property is set internal bool IsSetBudgetName() { return this._budgetName != null; } /// <summary> /// Gets and sets the property NewAction. /// <para> /// The updated action resource information. /// </para> /// </summary> [AWSProperty(Required=true)] public Action NewAction { get { return this._newAction; } set { this._newAction = value; } } // Check to see if NewAction property is set internal bool IsSetNewAction() { return this._newAction != null; } /// <summary> /// Gets and sets the property OldAction. /// <para> /// The previous action resource information. /// </para> /// </summary> [AWSProperty(Required=true)] public Action OldAction { get { return this._oldAction; } set { this._oldAction = value; } } // Check to see if OldAction property is set internal bool IsSetOldAction() { return this._oldAction != null; } } }
112
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Container for the parameters to the UpdateBudget operation. /// Updates a budget. You can change every part of a budget except for the <code>budgetName</code> /// and the <code>calculatedSpend</code>. When you modify a budget, the <code>calculatedSpend</code> /// drops to zero until Amazon Web Services has new usage data to use for forecasting. /// /// <important> /// <para> /// Only one of <code>BudgetLimit</code> or <code>PlannedBudgetLimits</code> can be present /// in the syntax at one time. Use the syntax that matches your case. The Request Syntax /// section shows the <code>BudgetLimit</code> syntax. For <code>PlannedBudgetLimits</code>, /// see the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_UpdateBudget.html#API_UpdateBudget_Examples">Examples</a> /// section. /// </para> /// </important> /// </summary> public partial class UpdateBudgetRequest : AmazonBudgetsRequest { private string _accountId; private Budget _newBudget; /// <summary> /// Gets and sets the property AccountId. /// <para> /// The <code>accountId</code> that is associated with the budget that you want to update. /// </para> /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property NewBudget. /// <para> /// The budget that you want to update your budget to. /// </para> /// </summary> [AWSProperty(Required=true)] public Budget NewBudget { get { return this._newBudget; } set { this._newBudget = value; } } // Check to see if NewBudget property is set internal bool IsSetNewBudget() { return this._newBudget != null; } } }
91
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Response of UpdateBudget /// </summary> public partial class UpdateBudgetResponse : AmazonWebServiceResponse { } }
38
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Container for the parameters to the UpdateNotification operation. /// Updates a notification. /// </summary> public partial class UpdateNotificationRequest : AmazonBudgetsRequest { private string _accountId; private string _budgetName; private Notification _newNotification; private Notification _oldNotification; /// <summary> /// Gets and sets the property AccountId. /// <para> /// The <code>accountId</code> that is associated with the budget whose notification you /// want to update. /// </para> /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property BudgetName. /// <para> /// The name of the budget whose notification you want to update. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public string BudgetName { get { return this._budgetName; } set { this._budgetName = value; } } // Check to see if BudgetName property is set internal bool IsSetBudgetName() { return this._budgetName != null; } /// <summary> /// Gets and sets the property NewNotification. /// <para> /// The updated notification to be associated with a budget. /// </para> /// </summary> [AWSProperty(Required=true)] public Notification NewNotification { get { return this._newNotification; } set { this._newNotification = value; } } // Check to see if NewNotification property is set internal bool IsSetNewNotification() { return this._newNotification != null; } /// <summary> /// Gets and sets the property OldNotification. /// <para> /// The previous notification that is associated with a budget. /// </para> /// </summary> [AWSProperty(Required=true)] public Notification OldNotification { get { return this._oldNotification; } set { this._oldNotification = value; } } // Check to see if OldNotification property is set internal bool IsSetOldNotification() { return this._oldNotification != null; } } }
120
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Response of UpdateNotification /// </summary> public partial class UpdateNotificationResponse : AmazonWebServiceResponse { } }
38
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Container for the parameters to the UpdateSubscriber operation. /// Updates a subscriber. /// </summary> public partial class UpdateSubscriberRequest : AmazonBudgetsRequest { private string _accountId; private string _budgetName; private Subscriber _newSubscriber; private Notification _notification; private Subscriber _oldSubscriber; /// <summary> /// Gets and sets the property AccountId. /// <para> /// The <code>accountId</code> that is associated with the budget whose subscriber you /// want to update. /// </para> /// </summary> [AWSProperty(Required=true, Min=12, Max=12)] 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; } /// <summary> /// Gets and sets the property BudgetName. /// <para> /// The name of the budget whose subscriber you want to update. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public string BudgetName { get { return this._budgetName; } set { this._budgetName = value; } } // Check to see if BudgetName property is set internal bool IsSetBudgetName() { return this._budgetName != null; } /// <summary> /// Gets and sets the property NewSubscriber. /// <para> /// The updated subscriber that is associated with a budget notification. /// </para> /// </summary> [AWSProperty(Required=true)] public Subscriber NewSubscriber { get { return this._newSubscriber; } set { this._newSubscriber = value; } } // Check to see if NewSubscriber property is set internal bool IsSetNewSubscriber() { return this._newSubscriber != null; } /// <summary> /// Gets and sets the property Notification. /// <para> /// The notification whose subscriber you want to update. /// </para> /// </summary> [AWSProperty(Required=true)] public Notification Notification { get { return this._notification; } set { this._notification = value; } } // Check to see if Notification property is set internal bool IsSetNotification() { return this._notification != null; } /// <summary> /// Gets and sets the property OldSubscriber. /// <para> /// The previous subscriber that is associated with a budget notification. /// </para> /// </summary> [AWSProperty(Required=true)] public Subscriber OldSubscriber { get { return this._oldSubscriber; } set { this._oldSubscriber = value; } } // Check to see if OldSubscriber property is set internal bool IsSetOldSubscriber() { return this._oldSubscriber != null; } } }
140
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.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.Budgets.Model { /// <summary> /// Response of UpdateSubscriber /// </summary> public partial class UpdateSubscriberResponse : AmazonWebServiceResponse { } }
38
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AccessDeniedException Object /// </summary> public class AccessDeniedExceptionUnmarshaller : IErrorResponseUnmarshaller<AccessDeniedException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AccessDeniedException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public AccessDeniedException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); AccessDeniedException unmarshalledObject = new AccessDeniedException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static AccessDeniedExceptionUnmarshaller _instance = new AccessDeniedExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AccessDeniedExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ActionHistoryDetails Object /// </summary> public class ActionHistoryDetailsUnmarshaller : IUnmarshaller<ActionHistoryDetails, XmlUnmarshallerContext>, IUnmarshaller<ActionHistoryDetails, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ActionHistoryDetails IUnmarshaller<ActionHistoryDetails, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ActionHistoryDetails Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ActionHistoryDetails unmarshalledObject = new ActionHistoryDetails(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Action", targetDepth)) { var unmarshaller = ActionUnmarshaller.Instance; unmarshalledObject.Action = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Message", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Message = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ActionHistoryDetailsUnmarshaller _instance = new ActionHistoryDetailsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ActionHistoryDetailsUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ActionHistory Object /// </summary> public class ActionHistoryUnmarshaller : IUnmarshaller<ActionHistory, XmlUnmarshallerContext>, IUnmarshaller<ActionHistory, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ActionHistory IUnmarshaller<ActionHistory, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ActionHistory Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ActionHistory unmarshalledObject = new ActionHistory(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ActionHistoryDetails", targetDepth)) { var unmarshaller = ActionHistoryDetailsUnmarshaller.Instance; unmarshalledObject.ActionHistoryDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EventType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EventType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Timestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.Timestamp = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ActionHistoryUnmarshaller _instance = new ActionHistoryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ActionHistoryUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// ActionThreshold Marshaller /// </summary> public class ActionThresholdMarshaller : IRequestMarshaller<ActionThreshold, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(ActionThreshold requestObject, JsonMarshallerContext context) { if(requestObject.IsSetActionThresholdType()) { context.Writer.WritePropertyName("ActionThresholdType"); context.Writer.Write(requestObject.ActionThresholdType); } if(requestObject.IsSetActionThresholdValue()) { context.Writer.WritePropertyName("ActionThresholdValue"); context.Writer.Write(requestObject.ActionThresholdValue); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ActionThresholdMarshaller Instance = new ActionThresholdMarshaller(); } }
68
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ActionThreshold Object /// </summary> public class ActionThresholdUnmarshaller : IUnmarshaller<ActionThreshold, XmlUnmarshallerContext>, IUnmarshaller<ActionThreshold, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ActionThreshold IUnmarshaller<ActionThreshold, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ActionThreshold Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ActionThreshold unmarshalledObject = new ActionThreshold(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ActionThresholdType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ActionThresholdType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ActionThresholdValue", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.ActionThresholdValue = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ActionThresholdUnmarshaller _instance = new ActionThresholdUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ActionThresholdUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Action Object /// </summary> public class ActionUnmarshaller : IUnmarshaller<Action, XmlUnmarshallerContext>, IUnmarshaller<Action, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Action IUnmarshaller<Action, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Action Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Action unmarshalledObject = new Action(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ActionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ActionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ActionThreshold", targetDepth)) { var unmarshaller = ActionThresholdUnmarshaller.Instance; unmarshalledObject.ActionThreshold = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ActionType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ActionType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ApprovalModel", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ApprovalModel = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BudgetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.BudgetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Definition", targetDepth)) { var unmarshaller = DefinitionUnmarshaller.Instance; unmarshalledObject.Definition = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExecutionRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ExecutionRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NotificationType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NotificationType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Subscribers", targetDepth)) { var unmarshaller = new ListUnmarshaller<Subscriber, SubscriberUnmarshaller>(SubscriberUnmarshaller.Instance); unmarshalledObject.Subscribers = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ActionUnmarshaller _instance = new ActionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ActionUnmarshaller Instance { get { return _instance; } } } }
146
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// AutoAdjustData Marshaller /// </summary> public class AutoAdjustDataMarshaller : IRequestMarshaller<AutoAdjustData, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(AutoAdjustData requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAutoAdjustType()) { context.Writer.WritePropertyName("AutoAdjustType"); context.Writer.Write(requestObject.AutoAdjustType); } if(requestObject.IsSetHistoricalOptions()) { context.Writer.WritePropertyName("HistoricalOptions"); context.Writer.WriteObjectStart(); var marshaller = HistoricalOptionsMarshaller.Instance; marshaller.Marshall(requestObject.HistoricalOptions, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetLastAutoAdjustTime()) { context.Writer.WritePropertyName("LastAutoAdjustTime"); context.Writer.Write(requestObject.LastAutoAdjustTime); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static AutoAdjustDataMarshaller Instance = new AutoAdjustDataMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AutoAdjustData Object /// </summary> public class AutoAdjustDataUnmarshaller : IUnmarshaller<AutoAdjustData, XmlUnmarshallerContext>, IUnmarshaller<AutoAdjustData, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AutoAdjustData IUnmarshaller<AutoAdjustData, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AutoAdjustData Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AutoAdjustData unmarshalledObject = new AutoAdjustData(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AutoAdjustType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AutoAdjustType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HistoricalOptions", targetDepth)) { var unmarshaller = HistoricalOptionsUnmarshaller.Instance; unmarshalledObject.HistoricalOptions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastAutoAdjustTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastAutoAdjustTime = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AutoAdjustDataUnmarshaller _instance = new AutoAdjustDataUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AutoAdjustDataUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BudgetedAndActualAmounts Object /// </summary> public class BudgetedAndActualAmountsUnmarshaller : IUnmarshaller<BudgetedAndActualAmounts, XmlUnmarshallerContext>, IUnmarshaller<BudgetedAndActualAmounts, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BudgetedAndActualAmounts IUnmarshaller<BudgetedAndActualAmounts, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BudgetedAndActualAmounts Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BudgetedAndActualAmounts unmarshalledObject = new BudgetedAndActualAmounts(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ActualAmount", targetDepth)) { var unmarshaller = SpendUnmarshaller.Instance; unmarshalledObject.ActualAmount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BudgetedAmount", targetDepth)) { var unmarshaller = SpendUnmarshaller.Instance; unmarshalledObject.BudgetedAmount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TimePeriod", targetDepth)) { var unmarshaller = TimePeriodUnmarshaller.Instance; unmarshalledObject.TimePeriod = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BudgetedAndActualAmountsUnmarshaller _instance = new BudgetedAndActualAmountsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BudgetedAndActualAmountsUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Budget Marshaller /// </summary> public class BudgetMarshaller : IRequestMarshaller<Budget, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(Budget requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAutoAdjustData()) { context.Writer.WritePropertyName("AutoAdjustData"); context.Writer.WriteObjectStart(); var marshaller = AutoAdjustDataMarshaller.Instance; marshaller.Marshall(requestObject.AutoAdjustData, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetBudgetLimit()) { context.Writer.WritePropertyName("BudgetLimit"); context.Writer.WriteObjectStart(); var marshaller = SpendMarshaller.Instance; marshaller.Marshall(requestObject.BudgetLimit, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(requestObject.BudgetName); } if(requestObject.IsSetBudgetType()) { context.Writer.WritePropertyName("BudgetType"); context.Writer.Write(requestObject.BudgetType); } if(requestObject.IsSetCalculatedSpend()) { context.Writer.WritePropertyName("CalculatedSpend"); context.Writer.WriteObjectStart(); var marshaller = CalculatedSpendMarshaller.Instance; marshaller.Marshall(requestObject.CalculatedSpend, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetCostFilters()) { context.Writer.WritePropertyName("CostFilters"); context.Writer.WriteObjectStart(); foreach (var requestObjectCostFiltersKvp in requestObject.CostFilters) { context.Writer.WritePropertyName(requestObjectCostFiltersKvp.Key); var requestObjectCostFiltersValue = requestObjectCostFiltersKvp.Value; context.Writer.WriteArrayStart(); foreach(var requestObjectCostFiltersValueListValue in requestObjectCostFiltersValue) { context.Writer.Write(requestObjectCostFiltersValueListValue); } context.Writer.WriteArrayEnd(); } context.Writer.WriteObjectEnd(); } if(requestObject.IsSetCostTypes()) { context.Writer.WritePropertyName("CostTypes"); context.Writer.WriteObjectStart(); var marshaller = CostTypesMarshaller.Instance; marshaller.Marshall(requestObject.CostTypes, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetLastUpdatedTime()) { context.Writer.WritePropertyName("LastUpdatedTime"); context.Writer.Write(requestObject.LastUpdatedTime); } if(requestObject.IsSetPlannedBudgetLimits()) { context.Writer.WritePropertyName("PlannedBudgetLimits"); context.Writer.WriteObjectStart(); foreach (var requestObjectPlannedBudgetLimitsKvp in requestObject.PlannedBudgetLimits) { context.Writer.WritePropertyName(requestObjectPlannedBudgetLimitsKvp.Key); var requestObjectPlannedBudgetLimitsValue = requestObjectPlannedBudgetLimitsKvp.Value; context.Writer.WriteObjectStart(); var marshaller = SpendMarshaller.Instance; marshaller.Marshall(requestObjectPlannedBudgetLimitsValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } if(requestObject.IsSetTimePeriod()) { context.Writer.WritePropertyName("TimePeriod"); context.Writer.WriteObjectStart(); var marshaller = TimePeriodMarshaller.Instance; marshaller.Marshall(requestObject.TimePeriod, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetTimeUnit()) { context.Writer.WritePropertyName("TimeUnit"); context.Writer.Write(requestObject.TimeUnit); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BudgetMarshaller Instance = new BudgetMarshaller(); } }
173
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BudgetNotificationsForAccount Object /// </summary> public class BudgetNotificationsForAccountUnmarshaller : IUnmarshaller<BudgetNotificationsForAccount, XmlUnmarshallerContext>, IUnmarshaller<BudgetNotificationsForAccount, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BudgetNotificationsForAccount IUnmarshaller<BudgetNotificationsForAccount, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BudgetNotificationsForAccount Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BudgetNotificationsForAccount unmarshalledObject = new BudgetNotificationsForAccount(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("BudgetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.BudgetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Notifications", targetDepth)) { var unmarshaller = new ListUnmarshaller<Notification, NotificationUnmarshaller>(NotificationUnmarshaller.Instance); unmarshalledObject.Notifications = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BudgetNotificationsForAccountUnmarshaller _instance = new BudgetNotificationsForAccountUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BudgetNotificationsForAccountUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BudgetPerformanceHistory Object /// </summary> public class BudgetPerformanceHistoryUnmarshaller : IUnmarshaller<BudgetPerformanceHistory, XmlUnmarshallerContext>, IUnmarshaller<BudgetPerformanceHistory, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BudgetPerformanceHistory IUnmarshaller<BudgetPerformanceHistory, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BudgetPerformanceHistory Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BudgetPerformanceHistory unmarshalledObject = new BudgetPerformanceHistory(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("BudgetedAndActualAmountsList", targetDepth)) { var unmarshaller = new ListUnmarshaller<BudgetedAndActualAmounts, BudgetedAndActualAmountsUnmarshaller>(BudgetedAndActualAmountsUnmarshaller.Instance); unmarshalledObject.BudgetedAndActualAmountsList = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BudgetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.BudgetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BudgetType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.BudgetType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CostFilters", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, List<string>, StringUnmarshaller, ListUnmarshaller<string, StringUnmarshaller>>(StringUnmarshaller.Instance, new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance)); unmarshalledObject.CostFilters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CostTypes", targetDepth)) { var unmarshaller = CostTypesUnmarshaller.Instance; unmarshalledObject.CostTypes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TimeUnit", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TimeUnit = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BudgetPerformanceHistoryUnmarshaller _instance = new BudgetPerformanceHistoryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BudgetPerformanceHistoryUnmarshaller Instance { get { return _instance; } } } }
122
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Budget Object /// </summary> public class BudgetUnmarshaller : IUnmarshaller<Budget, XmlUnmarshallerContext>, IUnmarshaller<Budget, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Budget IUnmarshaller<Budget, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Budget Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Budget unmarshalledObject = new Budget(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AutoAdjustData", targetDepth)) { var unmarshaller = AutoAdjustDataUnmarshaller.Instance; unmarshalledObject.AutoAdjustData = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BudgetLimit", targetDepth)) { var unmarshaller = SpendUnmarshaller.Instance; unmarshalledObject.BudgetLimit = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BudgetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.BudgetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BudgetType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.BudgetType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CalculatedSpend", targetDepth)) { var unmarshaller = CalculatedSpendUnmarshaller.Instance; unmarshalledObject.CalculatedSpend = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CostFilters", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, List<string>, StringUnmarshaller, ListUnmarshaller<string, StringUnmarshaller>>(StringUnmarshaller.Instance, new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance)); unmarshalledObject.CostFilters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CostTypes", targetDepth)) { var unmarshaller = CostTypesUnmarshaller.Instance; unmarshalledObject.CostTypes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastUpdatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastUpdatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PlannedBudgetLimits", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, Spend, StringUnmarshaller, SpendUnmarshaller>(StringUnmarshaller.Instance, SpendUnmarshaller.Instance); unmarshalledObject.PlannedBudgetLimits = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TimePeriod", targetDepth)) { var unmarshaller = TimePeriodUnmarshaller.Instance; unmarshalledObject.TimePeriod = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TimeUnit", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TimeUnit = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BudgetUnmarshaller _instance = new BudgetUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BudgetUnmarshaller Instance { get { return _instance; } } } }
152
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// CalculatedSpend Marshaller /// </summary> public class CalculatedSpendMarshaller : IRequestMarshaller<CalculatedSpend, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(CalculatedSpend requestObject, JsonMarshallerContext context) { if(requestObject.IsSetActualSpend()) { context.Writer.WritePropertyName("ActualSpend"); context.Writer.WriteObjectStart(); var marshaller = SpendMarshaller.Instance; marshaller.Marshall(requestObject.ActualSpend, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetForecastedSpend()) { context.Writer.WritePropertyName("ForecastedSpend"); context.Writer.WriteObjectStart(); var marshaller = SpendMarshaller.Instance; marshaller.Marshall(requestObject.ForecastedSpend, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CalculatedSpendMarshaller Instance = new CalculatedSpendMarshaller(); } }
78
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CalculatedSpend Object /// </summary> public class CalculatedSpendUnmarshaller : IUnmarshaller<CalculatedSpend, XmlUnmarshallerContext>, IUnmarshaller<CalculatedSpend, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> CalculatedSpend IUnmarshaller<CalculatedSpend, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public CalculatedSpend Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; CalculatedSpend unmarshalledObject = new CalculatedSpend(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ActualSpend", targetDepth)) { var unmarshaller = SpendUnmarshaller.Instance; unmarshalledObject.ActualSpend = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ForecastedSpend", targetDepth)) { var unmarshaller = SpendUnmarshaller.Instance; unmarshalledObject.ForecastedSpend = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static CalculatedSpendUnmarshaller _instance = new CalculatedSpendUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static CalculatedSpendUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// CostTypes Marshaller /// </summary> public class CostTypesMarshaller : IRequestMarshaller<CostTypes, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(CostTypes requestObject, JsonMarshallerContext context) { if(requestObject.IsSetIncludeCredit()) { context.Writer.WritePropertyName("IncludeCredit"); context.Writer.Write(requestObject.IncludeCredit); } if(requestObject.IsSetIncludeDiscount()) { context.Writer.WritePropertyName("IncludeDiscount"); context.Writer.Write(requestObject.IncludeDiscount); } if(requestObject.IsSetIncludeOtherSubscription()) { context.Writer.WritePropertyName("IncludeOtherSubscription"); context.Writer.Write(requestObject.IncludeOtherSubscription); } if(requestObject.IsSetIncludeRecurring()) { context.Writer.WritePropertyName("IncludeRecurring"); context.Writer.Write(requestObject.IncludeRecurring); } if(requestObject.IsSetIncludeRefund()) { context.Writer.WritePropertyName("IncludeRefund"); context.Writer.Write(requestObject.IncludeRefund); } if(requestObject.IsSetIncludeSubscription()) { context.Writer.WritePropertyName("IncludeSubscription"); context.Writer.Write(requestObject.IncludeSubscription); } if(requestObject.IsSetIncludeSupport()) { context.Writer.WritePropertyName("IncludeSupport"); context.Writer.Write(requestObject.IncludeSupport); } if(requestObject.IsSetIncludeTax()) { context.Writer.WritePropertyName("IncludeTax"); context.Writer.Write(requestObject.IncludeTax); } if(requestObject.IsSetIncludeUpfront()) { context.Writer.WritePropertyName("IncludeUpfront"); context.Writer.Write(requestObject.IncludeUpfront); } if(requestObject.IsSetUseAmortized()) { context.Writer.WritePropertyName("UseAmortized"); context.Writer.Write(requestObject.UseAmortized); } if(requestObject.IsSetUseBlended()) { context.Writer.WritePropertyName("UseBlended"); context.Writer.Write(requestObject.UseBlended); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CostTypesMarshaller Instance = new CostTypesMarshaller(); } }
122
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CostTypes Object /// </summary> public class CostTypesUnmarshaller : IUnmarshaller<CostTypes, XmlUnmarshallerContext>, IUnmarshaller<CostTypes, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> CostTypes IUnmarshaller<CostTypes, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public CostTypes Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; CostTypes unmarshalledObject = new CostTypes(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("IncludeCredit", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IncludeCredit = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IncludeDiscount", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IncludeDiscount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IncludeOtherSubscription", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IncludeOtherSubscription = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IncludeRecurring", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IncludeRecurring = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IncludeRefund", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IncludeRefund = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IncludeSubscription", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IncludeSubscription = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IncludeSupport", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IncludeSupport = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IncludeTax", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IncludeTax = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IncludeUpfront", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IncludeUpfront = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("UseAmortized", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.UseAmortized = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("UseBlended", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.UseBlended = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static CostTypesUnmarshaller _instance = new CostTypesUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static CostTypesUnmarshaller Instance { get { return _instance; } } } }
152
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// CreateBudgetAction Request Marshaller /// </summary> public class CreateBudgetActionRequestMarshaller : IMarshaller<IRequest, CreateBudgetActionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateBudgetActionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateBudgetActionRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.CreateBudgetAction"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetActionThreshold()) { context.Writer.WritePropertyName("ActionThreshold"); context.Writer.WriteObjectStart(); var marshaller = ActionThresholdMarshaller.Instance; marshaller.Marshall(publicRequest.ActionThreshold, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetActionType()) { context.Writer.WritePropertyName("ActionType"); context.Writer.Write(publicRequest.ActionType); } if(publicRequest.IsSetApprovalModel()) { context.Writer.WritePropertyName("ApprovalModel"); context.Writer.Write(publicRequest.ApprovalModel); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } if(publicRequest.IsSetDefinition()) { context.Writer.WritePropertyName("Definition"); context.Writer.WriteObjectStart(); var marshaller = DefinitionMarshaller.Instance; marshaller.Marshall(publicRequest.Definition, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetExecutionRoleArn()) { context.Writer.WritePropertyName("ExecutionRoleArn"); context.Writer.Write(publicRequest.ExecutionRoleArn); } if(publicRequest.IsSetNotificationType()) { context.Writer.WritePropertyName("NotificationType"); context.Writer.Write(publicRequest.NotificationType); } if(publicRequest.IsSetSubscribers()) { context.Writer.WritePropertyName("Subscribers"); context.Writer.WriteArrayStart(); foreach(var publicRequestSubscribersListValue in publicRequest.Subscribers) { context.Writer.WriteObjectStart(); var marshaller = SubscriberMarshaller.Instance; marshaller.Marshall(publicRequestSubscribersListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateBudgetActionRequestMarshaller _instance = new CreateBudgetActionRequestMarshaller(); internal static CreateBudgetActionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateBudgetActionRequestMarshaller Instance { get { return _instance; } } } }
171
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateBudgetAction operation /// </summary> public class CreateBudgetActionResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateBudgetActionResponse response = new CreateBudgetActionResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AccountId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AccountId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ActionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ActionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BudgetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.BudgetName = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("CreationLimitExceededException")) { return CreationLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DuplicateRecordException")) { return DuplicateRecordExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateBudgetActionResponseUnmarshaller _instance = new CreateBudgetActionResponseUnmarshaller(); internal static CreateBudgetActionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateBudgetActionResponseUnmarshaller Instance { get { return _instance; } } } }
146
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// CreateBudget Request Marshaller /// </summary> public class CreateBudgetRequestMarshaller : IMarshaller<IRequest, CreateBudgetRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateBudgetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateBudgetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.CreateBudget"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetBudget()) { context.Writer.WritePropertyName("Budget"); context.Writer.WriteObjectStart(); var marshaller = BudgetMarshaller.Instance; marshaller.Marshall(publicRequest.Budget, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetNotificationsWithSubscribers()) { context.Writer.WritePropertyName("NotificationsWithSubscribers"); context.Writer.WriteArrayStart(); foreach(var publicRequestNotificationsWithSubscribersListValue in publicRequest.NotificationsWithSubscribers) { context.Writer.WriteObjectStart(); var marshaller = NotificationWithSubscribersMarshaller.Instance; marshaller.Marshall(publicRequestNotificationsWithSubscribersListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateBudgetRequestMarshaller _instance = new CreateBudgetRequestMarshaller(); internal static CreateBudgetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateBudgetRequestMarshaller Instance { get { return _instance; } } } }
130
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateBudget operation /// </summary> public class CreateBudgetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateBudgetResponse response = new CreateBudgetResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("CreationLimitExceededException")) { return CreationLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DuplicateRecordException")) { return DuplicateRecordExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateBudgetResponseUnmarshaller _instance = new CreateBudgetResponseUnmarshaller(); internal static CreateBudgetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateBudgetResponseUnmarshaller Instance { get { return _instance; } } } }
119
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// CreateNotification Request Marshaller /// </summary> public class CreateNotificationRequestMarshaller : IMarshaller<IRequest, CreateNotificationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateNotificationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateNotificationRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.CreateNotification"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } if(publicRequest.IsSetNotification()) { context.Writer.WritePropertyName("Notification"); context.Writer.WriteObjectStart(); var marshaller = NotificationMarshaller.Instance; marshaller.Marshall(publicRequest.Notification, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetSubscribers()) { context.Writer.WritePropertyName("Subscribers"); context.Writer.WriteArrayStart(); foreach(var publicRequestSubscribersListValue in publicRequest.Subscribers) { context.Writer.WriteObjectStart(); var marshaller = SubscriberMarshaller.Instance; marshaller.Marshall(publicRequestSubscribersListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateNotificationRequestMarshaller _instance = new CreateNotificationRequestMarshaller(); internal static CreateNotificationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateNotificationRequestMarshaller Instance { get { return _instance; } } } }
136
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateNotification operation /// </summary> public class CreateNotificationResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateNotificationResponse response = new CreateNotificationResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("CreationLimitExceededException")) { return CreationLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DuplicateRecordException")) { return DuplicateRecordExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateNotificationResponseUnmarshaller _instance = new CreateNotificationResponseUnmarshaller(); internal static CreateNotificationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateNotificationResponseUnmarshaller Instance { get { return _instance; } } } }
123
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// CreateSubscriber Request Marshaller /// </summary> public class CreateSubscriberRequestMarshaller : IMarshaller<IRequest, CreateSubscriberRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateSubscriberRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateSubscriberRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.CreateSubscriber"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } if(publicRequest.IsSetNotification()) { context.Writer.WritePropertyName("Notification"); context.Writer.WriteObjectStart(); var marshaller = NotificationMarshaller.Instance; marshaller.Marshall(publicRequest.Notification, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetSubscriber()) { context.Writer.WritePropertyName("Subscriber"); context.Writer.WriteObjectStart(); var marshaller = SubscriberMarshaller.Instance; marshaller.Marshall(publicRequest.Subscriber, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateSubscriberRequestMarshaller _instance = new CreateSubscriberRequestMarshaller(); internal static CreateSubscriberRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateSubscriberRequestMarshaller Instance { get { return _instance; } } } }
131
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateSubscriber operation /// </summary> public class CreateSubscriberResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateSubscriberResponse response = new CreateSubscriberResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("CreationLimitExceededException")) { return CreationLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DuplicateRecordException")) { return DuplicateRecordExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateSubscriberResponseUnmarshaller _instance = new CreateSubscriberResponseUnmarshaller(); internal static CreateSubscriberResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateSubscriberResponseUnmarshaller Instance { get { return _instance; } } } }
123
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreationLimitExceededException Object /// </summary> public class CreationLimitExceededExceptionUnmarshaller : IErrorResponseUnmarshaller<CreationLimitExceededException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public CreationLimitExceededException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public CreationLimitExceededException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); CreationLimitExceededException unmarshalledObject = new CreationLimitExceededException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static CreationLimitExceededExceptionUnmarshaller _instance = new CreationLimitExceededExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static CreationLimitExceededExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Definition Marshaller /// </summary> public class DefinitionMarshaller : IRequestMarshaller<Definition, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(Definition requestObject, JsonMarshallerContext context) { if(requestObject.IsSetIamActionDefinition()) { context.Writer.WritePropertyName("IamActionDefinition"); context.Writer.WriteObjectStart(); var marshaller = IamActionDefinitionMarshaller.Instance; marshaller.Marshall(requestObject.IamActionDefinition, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetScpActionDefinition()) { context.Writer.WritePropertyName("ScpActionDefinition"); context.Writer.WriteObjectStart(); var marshaller = ScpActionDefinitionMarshaller.Instance; marshaller.Marshall(requestObject.ScpActionDefinition, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetSsmActionDefinition()) { context.Writer.WritePropertyName("SsmActionDefinition"); context.Writer.WriteObjectStart(); var marshaller = SsmActionDefinitionMarshaller.Instance; marshaller.Marshall(requestObject.SsmActionDefinition, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static DefinitionMarshaller Instance = new DefinitionMarshaller(); } }
89
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Definition Object /// </summary> public class DefinitionUnmarshaller : IUnmarshaller<Definition, XmlUnmarshallerContext>, IUnmarshaller<Definition, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Definition IUnmarshaller<Definition, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Definition Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Definition unmarshalledObject = new Definition(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("IamActionDefinition", targetDepth)) { var unmarshaller = IamActionDefinitionUnmarshaller.Instance; unmarshalledObject.IamActionDefinition = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ScpActionDefinition", targetDepth)) { var unmarshaller = ScpActionDefinitionUnmarshaller.Instance; unmarshalledObject.ScpActionDefinition = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SsmActionDefinition", targetDepth)) { var unmarshaller = SsmActionDefinitionUnmarshaller.Instance; unmarshalledObject.SsmActionDefinition = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static DefinitionUnmarshaller _instance = new DefinitionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DefinitionUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DeleteBudgetAction Request Marshaller /// </summary> public class DeleteBudgetActionRequestMarshaller : IMarshaller<IRequest, DeleteBudgetActionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteBudgetActionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteBudgetActionRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DeleteBudgetAction"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetActionId()) { context.Writer.WritePropertyName("ActionId"); context.Writer.Write(publicRequest.ActionId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteBudgetActionRequestMarshaller _instance = new DeleteBudgetActionRequestMarshaller(); internal static DeleteBudgetActionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteBudgetActionRequestMarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteBudgetAction operation /// </summary> public class DeleteBudgetActionResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteBudgetActionResponse response = new DeleteBudgetActionResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AccountId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AccountId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Action", targetDepth)) { var unmarshaller = ActionUnmarshaller.Instance; response.Action = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BudgetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.BudgetName = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLockedException")) { return ResourceLockedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteBudgetActionResponseUnmarshaller _instance = new DeleteBudgetActionResponseUnmarshaller(); internal static DeleteBudgetActionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteBudgetActionResponseUnmarshaller Instance { get { return _instance; } } } }
142
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DeleteBudget Request Marshaller /// </summary> public class DeleteBudgetRequestMarshaller : IMarshaller<IRequest, DeleteBudgetRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteBudgetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteBudgetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DeleteBudget"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteBudgetRequestMarshaller _instance = new DeleteBudgetRequestMarshaller(); internal static DeleteBudgetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteBudgetRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteBudget operation /// </summary> public class DeleteBudgetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteBudgetResponse response = new DeleteBudgetResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteBudgetResponseUnmarshaller _instance = new DeleteBudgetResponseUnmarshaller(); internal static DeleteBudgetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteBudgetResponseUnmarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DeleteNotification Request Marshaller /// </summary> public class DeleteNotificationRequestMarshaller : IMarshaller<IRequest, DeleteNotificationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteNotificationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteNotificationRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DeleteNotification"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } if(publicRequest.IsSetNotification()) { context.Writer.WritePropertyName("Notification"); context.Writer.WriteObjectStart(); var marshaller = NotificationMarshaller.Instance; marshaller.Marshall(publicRequest.Notification, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteNotificationRequestMarshaller _instance = new DeleteNotificationRequestMarshaller(); internal static DeleteNotificationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteNotificationRequestMarshaller Instance { get { return _instance; } } } }
120
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteNotification operation /// </summary> public class DeleteNotificationResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteNotificationResponse response = new DeleteNotificationResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteNotificationResponseUnmarshaller _instance = new DeleteNotificationResponseUnmarshaller(); internal static DeleteNotificationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteNotificationResponseUnmarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DeleteSubscriber Request Marshaller /// </summary> public class DeleteSubscriberRequestMarshaller : IMarshaller<IRequest, DeleteSubscriberRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteSubscriberRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteSubscriberRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DeleteSubscriber"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } if(publicRequest.IsSetNotification()) { context.Writer.WritePropertyName("Notification"); context.Writer.WriteObjectStart(); var marshaller = NotificationMarshaller.Instance; marshaller.Marshall(publicRequest.Notification, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetSubscriber()) { context.Writer.WritePropertyName("Subscriber"); context.Writer.WriteObjectStart(); var marshaller = SubscriberMarshaller.Instance; marshaller.Marshall(publicRequest.Subscriber, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteSubscriberRequestMarshaller _instance = new DeleteSubscriberRequestMarshaller(); internal static DeleteSubscriberRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteSubscriberRequestMarshaller Instance { get { return _instance; } } } }
131
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteSubscriber operation /// </summary> public class DeleteSubscriberResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteSubscriberResponse response = new DeleteSubscriberResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteSubscriberResponseUnmarshaller _instance = new DeleteSubscriberResponseUnmarshaller(); internal static DeleteSubscriberResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteSubscriberResponseUnmarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DescribeBudgetActionHistories Request Marshaller /// </summary> public class DescribeBudgetActionHistoriesRequestMarshaller : IMarshaller<IRequest, DescribeBudgetActionHistoriesRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeBudgetActionHistoriesRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeBudgetActionHistoriesRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DescribeBudgetActionHistories"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetActionId()) { context.Writer.WritePropertyName("ActionId"); context.Writer.Write(publicRequest.ActionId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(publicRequest.NextToken); } if(publicRequest.IsSetTimePeriod()) { context.Writer.WritePropertyName("TimePeriod"); context.Writer.WriteObjectStart(); var marshaller = TimePeriodMarshaller.Instance; marshaller.Marshall(publicRequest.TimePeriod, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DescribeBudgetActionHistoriesRequestMarshaller _instance = new DescribeBudgetActionHistoriesRequestMarshaller(); internal static DescribeBudgetActionHistoriesRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetActionHistoriesRequestMarshaller Instance { get { return _instance; } } } }
138
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeBudgetActionHistories operation /// </summary> public class DescribeBudgetActionHistoriesResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeBudgetActionHistoriesResponse response = new DescribeBudgetActionHistoriesResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ActionHistories", targetDepth)) { var unmarshaller = new ListUnmarshaller<ActionHistory, ActionHistoryUnmarshaller>(ActionHistoryUnmarshaller.Instance); response.ActionHistories = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidNextTokenException")) { return InvalidNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeBudgetActionHistoriesResponseUnmarshaller _instance = new DescribeBudgetActionHistoriesResponseUnmarshaller(); internal static DescribeBudgetActionHistoriesResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetActionHistoriesResponseUnmarshaller Instance { get { return _instance; } } } }
136
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DescribeBudgetAction Request Marshaller /// </summary> public class DescribeBudgetActionRequestMarshaller : IMarshaller<IRequest, DescribeBudgetActionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeBudgetActionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeBudgetActionRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DescribeBudgetAction"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetActionId()) { context.Writer.WritePropertyName("ActionId"); context.Writer.Write(publicRequest.ActionId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DescribeBudgetActionRequestMarshaller _instance = new DescribeBudgetActionRequestMarshaller(); internal static DescribeBudgetActionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetActionRequestMarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeBudgetAction operation /// </summary> public class DescribeBudgetActionResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeBudgetActionResponse response = new DescribeBudgetActionResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AccountId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AccountId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Action", targetDepth)) { var unmarshaller = ActionUnmarshaller.Instance; response.Action = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BudgetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.BudgetName = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeBudgetActionResponseUnmarshaller _instance = new DescribeBudgetActionResponseUnmarshaller(); internal static DescribeBudgetActionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetActionResponseUnmarshaller Instance { get { return _instance; } } } }
138
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DescribeBudgetActionsForAccount Request Marshaller /// </summary> public class DescribeBudgetActionsForAccountRequestMarshaller : IMarshaller<IRequest, DescribeBudgetActionsForAccountRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeBudgetActionsForAccountRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeBudgetActionsForAccountRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DescribeBudgetActionsForAccount"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(publicRequest.NextToken); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DescribeBudgetActionsForAccountRequestMarshaller _instance = new DescribeBudgetActionsForAccountRequestMarshaller(); internal static DescribeBudgetActionsForAccountRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetActionsForAccountRequestMarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeBudgetActionsForAccount operation /// </summary> public class DescribeBudgetActionsForAccountResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeBudgetActionsForAccountResponse response = new DescribeBudgetActionsForAccountResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Actions", targetDepth)) { var unmarshaller = new ListUnmarshaller<Action, ActionUnmarshaller>(ActionUnmarshaller.Instance); response.Actions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidNextTokenException")) { return InvalidNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeBudgetActionsForAccountResponseUnmarshaller _instance = new DescribeBudgetActionsForAccountResponseUnmarshaller(); internal static DescribeBudgetActionsForAccountResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetActionsForAccountResponseUnmarshaller Instance { get { return _instance; } } } }
132
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DescribeBudgetActionsForBudget Request Marshaller /// </summary> public class DescribeBudgetActionsForBudgetRequestMarshaller : IMarshaller<IRequest, DescribeBudgetActionsForBudgetRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeBudgetActionsForBudgetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeBudgetActionsForBudgetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DescribeBudgetActionsForBudget"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(publicRequest.NextToken); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DescribeBudgetActionsForBudgetRequestMarshaller _instance = new DescribeBudgetActionsForBudgetRequestMarshaller(); internal static DescribeBudgetActionsForBudgetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetActionsForBudgetRequestMarshaller Instance { get { return _instance; } } } }
121
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeBudgetActionsForBudget operation /// </summary> public class DescribeBudgetActionsForBudgetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeBudgetActionsForBudgetResponse response = new DescribeBudgetActionsForBudgetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Actions", targetDepth)) { var unmarshaller = new ListUnmarshaller<Action, ActionUnmarshaller>(ActionUnmarshaller.Instance); response.Actions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidNextTokenException")) { return InvalidNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeBudgetActionsForBudgetResponseUnmarshaller _instance = new DescribeBudgetActionsForBudgetResponseUnmarshaller(); internal static DescribeBudgetActionsForBudgetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetActionsForBudgetResponseUnmarshaller Instance { get { return _instance; } } } }
136
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DescribeBudgetNotificationsForAccount Request Marshaller /// </summary> public class DescribeBudgetNotificationsForAccountRequestMarshaller : IMarshaller<IRequest, DescribeBudgetNotificationsForAccountRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeBudgetNotificationsForAccountRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeBudgetNotificationsForAccountRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(publicRequest.NextToken); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DescribeBudgetNotificationsForAccountRequestMarshaller _instance = new DescribeBudgetNotificationsForAccountRequestMarshaller(); internal static DescribeBudgetNotificationsForAccountRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetNotificationsForAccountRequestMarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeBudgetNotificationsForAccount operation /// </summary> public class DescribeBudgetNotificationsForAccountResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeBudgetNotificationsForAccountResponse response = new DescribeBudgetNotificationsForAccountResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("BudgetNotificationsForAccount", targetDepth)) { var unmarshaller = new ListUnmarshaller<BudgetNotificationsForAccount, BudgetNotificationsForAccountUnmarshaller>(BudgetNotificationsForAccountUnmarshaller.Instance); response.BudgetNotificationsForAccount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ExpiredNextTokenException")) { return ExpiredNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidNextTokenException")) { return InvalidNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeBudgetNotificationsForAccountResponseUnmarshaller _instance = new DescribeBudgetNotificationsForAccountResponseUnmarshaller(); internal static DescribeBudgetNotificationsForAccountResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetNotificationsForAccountResponseUnmarshaller Instance { get { return _instance; } } } }
140
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DescribeBudgetPerformanceHistory Request Marshaller /// </summary> public class DescribeBudgetPerformanceHistoryRequestMarshaller : IMarshaller<IRequest, DescribeBudgetPerformanceHistoryRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeBudgetPerformanceHistoryRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeBudgetPerformanceHistoryRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(publicRequest.NextToken); } if(publicRequest.IsSetTimePeriod()) { context.Writer.WritePropertyName("TimePeriod"); context.Writer.WriteObjectStart(); var marshaller = TimePeriodMarshaller.Instance; marshaller.Marshall(publicRequest.TimePeriod, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DescribeBudgetPerformanceHistoryRequestMarshaller _instance = new DescribeBudgetPerformanceHistoryRequestMarshaller(); internal static DescribeBudgetPerformanceHistoryRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetPerformanceHistoryRequestMarshaller Instance { get { return _instance; } } } }
132
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeBudgetPerformanceHistory operation /// </summary> public class DescribeBudgetPerformanceHistoryResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeBudgetPerformanceHistoryResponse response = new DescribeBudgetPerformanceHistoryResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("BudgetPerformanceHistory", targetDepth)) { var unmarshaller = BudgetPerformanceHistoryUnmarshaller.Instance; response.BudgetPerformanceHistory = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ExpiredNextTokenException")) { return ExpiredNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidNextTokenException")) { return InvalidNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeBudgetPerformanceHistoryResponseUnmarshaller _instance = new DescribeBudgetPerformanceHistoryResponseUnmarshaller(); internal static DescribeBudgetPerformanceHistoryResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetPerformanceHistoryResponseUnmarshaller Instance { get { return _instance; } } } }
140
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DescribeBudget Request Marshaller /// </summary> public class DescribeBudgetRequestMarshaller : IMarshaller<IRequest, DescribeBudgetRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeBudgetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeBudgetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DescribeBudget"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DescribeBudgetRequestMarshaller _instance = new DescribeBudgetRequestMarshaller(); internal static DescribeBudgetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeBudget operation /// </summary> public class DescribeBudgetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeBudgetResponse response = new DescribeBudgetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Budget", targetDepth)) { var unmarshaller = BudgetUnmarshaller.Instance; response.Budget = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeBudgetResponseUnmarshaller _instance = new DescribeBudgetResponseUnmarshaller(); internal static DescribeBudgetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetResponseUnmarshaller Instance { get { return _instance; } } } }
126
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DescribeBudgets Request Marshaller /// </summary> public class DescribeBudgetsRequestMarshaller : IMarshaller<IRequest, DescribeBudgetsRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeBudgetsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeBudgetsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DescribeBudgets"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(publicRequest.NextToken); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DescribeBudgetsRequestMarshaller _instance = new DescribeBudgetsRequestMarshaller(); internal static DescribeBudgetsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetsRequestMarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeBudgets operation /// </summary> public class DescribeBudgetsResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeBudgetsResponse response = new DescribeBudgetsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Budgets", targetDepth)) { var unmarshaller = new ListUnmarshaller<Budget, BudgetUnmarshaller>(BudgetUnmarshaller.Instance); response.Budgets = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ExpiredNextTokenException")) { return ExpiredNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidNextTokenException")) { return InvalidNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeBudgetsResponseUnmarshaller _instance = new DescribeBudgetsResponseUnmarshaller(); internal static DescribeBudgetsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeBudgetsResponseUnmarshaller Instance { get { return _instance; } } } }
140
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DescribeNotificationsForBudget Request Marshaller /// </summary> public class DescribeNotificationsForBudgetRequestMarshaller : IMarshaller<IRequest, DescribeNotificationsForBudgetRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeNotificationsForBudgetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeNotificationsForBudgetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DescribeNotificationsForBudget"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(publicRequest.NextToken); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DescribeNotificationsForBudgetRequestMarshaller _instance = new DescribeNotificationsForBudgetRequestMarshaller(); internal static DescribeNotificationsForBudgetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeNotificationsForBudgetRequestMarshaller Instance { get { return _instance; } } } }
121
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeNotificationsForBudget operation /// </summary> public class DescribeNotificationsForBudgetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeNotificationsForBudgetResponse response = new DescribeNotificationsForBudgetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Notifications", targetDepth)) { var unmarshaller = new ListUnmarshaller<Notification, NotificationUnmarshaller>(NotificationUnmarshaller.Instance); response.Notifications = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ExpiredNextTokenException")) { return ExpiredNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidNextTokenException")) { return InvalidNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeNotificationsForBudgetResponseUnmarshaller _instance = new DescribeNotificationsForBudgetResponseUnmarshaller(); internal static DescribeNotificationsForBudgetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeNotificationsForBudgetResponseUnmarshaller Instance { get { return _instance; } } } }
140
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// DescribeSubscribersForNotification Request Marshaller /// </summary> public class DescribeSubscribersForNotificationRequestMarshaller : IMarshaller<IRequest, DescribeSubscribersForNotificationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeSubscribersForNotificationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeSubscribersForNotificationRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.DescribeSubscribersForNotification"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(publicRequest.NextToken); } if(publicRequest.IsSetNotification()) { context.Writer.WritePropertyName("Notification"); context.Writer.WriteObjectStart(); var marshaller = NotificationMarshaller.Instance; marshaller.Marshall(publicRequest.Notification, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DescribeSubscribersForNotificationRequestMarshaller _instance = new DescribeSubscribersForNotificationRequestMarshaller(); internal static DescribeSubscribersForNotificationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeSubscribersForNotificationRequestMarshaller Instance { get { return _instance; } } } }
132
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeSubscribersForNotification operation /// </summary> public class DescribeSubscribersForNotificationResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeSubscribersForNotificationResponse response = new DescribeSubscribersForNotificationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Subscribers", targetDepth)) { var unmarshaller = new ListUnmarshaller<Subscriber, SubscriberUnmarshaller>(SubscriberUnmarshaller.Instance); response.Subscribers = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ExpiredNextTokenException")) { return ExpiredNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidNextTokenException")) { return InvalidNextTokenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeSubscribersForNotificationResponseUnmarshaller _instance = new DescribeSubscribersForNotificationResponseUnmarshaller(); internal static DescribeSubscribersForNotificationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeSubscribersForNotificationResponseUnmarshaller Instance { get { return _instance; } } } }
140
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DuplicateRecordException Object /// </summary> public class DuplicateRecordExceptionUnmarshaller : IErrorResponseUnmarshaller<DuplicateRecordException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DuplicateRecordException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public DuplicateRecordException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); DuplicateRecordException unmarshalledObject = new DuplicateRecordException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static DuplicateRecordExceptionUnmarshaller _instance = new DuplicateRecordExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DuplicateRecordExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// ExecuteBudgetAction Request Marshaller /// </summary> public class ExecuteBudgetActionRequestMarshaller : IMarshaller<IRequest, ExecuteBudgetActionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((ExecuteBudgetActionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ExecuteBudgetActionRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.Budgets"); string target = "AWSBudgetServiceGateway.ExecuteBudgetAction"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-10-20"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccountId()) { context.Writer.WritePropertyName("AccountId"); context.Writer.Write(publicRequest.AccountId); } if(publicRequest.IsSetActionId()) { context.Writer.WritePropertyName("ActionId"); context.Writer.Write(publicRequest.ActionId); } if(publicRequest.IsSetBudgetName()) { context.Writer.WritePropertyName("BudgetName"); context.Writer.Write(publicRequest.BudgetName); } if(publicRequest.IsSetExecutionType()) { context.Writer.WritePropertyName("ExecutionType"); context.Writer.Write(publicRequest.ExecutionType); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static ExecuteBudgetActionRequestMarshaller _instance = new ExecuteBudgetActionRequestMarshaller(); internal static ExecuteBudgetActionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ExecuteBudgetActionRequestMarshaller Instance { get { return _instance; } } } }
121
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ExecuteBudgetAction operation /// </summary> public class ExecuteBudgetActionResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { ExecuteBudgetActionResponse response = new ExecuteBudgetActionResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AccountId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AccountId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ActionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ActionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BudgetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.BudgetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExecutionType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ExecutionType = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalErrorException")) { return InternalErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException")) { return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLockedException")) { return ResourceLockedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBudgetsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ExecuteBudgetActionResponseUnmarshaller _instance = new ExecuteBudgetActionResponseUnmarshaller(); internal static ExecuteBudgetActionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ExecuteBudgetActionResponseUnmarshaller Instance { get { return _instance; } } } }
148
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ExpiredNextTokenException Object /// </summary> public class ExpiredNextTokenExceptionUnmarshaller : IErrorResponseUnmarshaller<ExpiredNextTokenException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ExpiredNextTokenException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public ExpiredNextTokenException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ExpiredNextTokenException unmarshalledObject = new ExpiredNextTokenException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static ExpiredNextTokenExceptionUnmarshaller _instance = new ExpiredNextTokenExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ExpiredNextTokenExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// HistoricalOptions Marshaller /// </summary> public class HistoricalOptionsMarshaller : IRequestMarshaller<HistoricalOptions, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(HistoricalOptions requestObject, JsonMarshallerContext context) { if(requestObject.IsSetBudgetAdjustmentPeriod()) { context.Writer.WritePropertyName("BudgetAdjustmentPeriod"); context.Writer.Write(requestObject.BudgetAdjustmentPeriod); } if(requestObject.IsSetLookBackAvailablePeriods()) { context.Writer.WritePropertyName("LookBackAvailablePeriods"); context.Writer.Write(requestObject.LookBackAvailablePeriods); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static HistoricalOptionsMarshaller Instance = new HistoricalOptionsMarshaller(); } }
68
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for HistoricalOptions Object /// </summary> public class HistoricalOptionsUnmarshaller : IUnmarshaller<HistoricalOptions, XmlUnmarshallerContext>, IUnmarshaller<HistoricalOptions, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> HistoricalOptions IUnmarshaller<HistoricalOptions, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public HistoricalOptions Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; HistoricalOptions unmarshalledObject = new HistoricalOptions(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("BudgetAdjustmentPeriod", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.BudgetAdjustmentPeriod = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LookBackAvailablePeriods", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.LookBackAvailablePeriods = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static HistoricalOptionsUnmarshaller _instance = new HistoricalOptionsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static HistoricalOptionsUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 budgets-2016-10-20.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.Budgets.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Budgets.Model.Internal.MarshallTransformations { /// <summary> /// IamActionDefinition Marshaller /// </summary> public class IamActionDefinitionMarshaller : IRequestMarshaller<IamActionDefinition, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(IamActionDefinition requestObject, JsonMarshallerContext context) { if(requestObject.IsSetGroups()) { context.Writer.WritePropertyName("Groups"); context.Writer.WriteArrayStart(); foreach(var requestObjectGroupsListValue in requestObject.Groups) { context.Writer.Write(requestObjectGroupsListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetPolicyArn()) { context.Writer.WritePropertyName("PolicyArn"); context.Writer.Write(requestObject.PolicyArn); } if(requestObject.IsSetRoles()) { context.Writer.WritePropertyName("Roles"); context.Writer.WriteArrayStart(); foreach(var requestObjectRolesListValue in requestObject.Roles) { context.Writer.Write(requestObjectRolesListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetUsers()) { context.Writer.WritePropertyName("Users"); context.Writer.WriteArrayStart(); foreach(var requestObjectUsersListValue in requestObject.Users) { context.Writer.Write(requestObjectUsersListValue); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static IamActionDefinitionMarshaller Instance = new IamActionDefinitionMarshaller(); } }
95