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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Container for the parameters to the ListPolicyGenerations operation. /// Lists all of the policy generations requested in the last seven days. /// </summary> public partial class ListPolicyGenerationsRequest : AmazonAccessAnalyzerRequest { private int? _maxResults; private string _nextToken; private string _principalArn; /// <summary> /// Gets and sets the property MaxResults. /// <para> /// The maximum number of results to return in the response. /// </para> /// </summary> [AWSProperty(Min=1)] 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> /// A token used for pagination of results returned. /// </para> /// </summary> 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 PrincipalArn. /// <para> /// The ARN of the IAM entity (user or role) for which you are generating a policy. Use /// this with <code>ListGeneratedPolicies</code> to filter the results to only include /// results for a specific principal. /// </para> /// </summary> public string PrincipalArn { get { return this._principalArn; } set { this._principalArn = value; } } // Check to see if PrincipalArn property is set internal bool IsSetPrincipalArn() { return this._principalArn != 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// This is the response object from the ListPolicyGenerations operation. /// </summary> public partial class ListPolicyGenerationsResponse : AmazonWebServiceResponse { private string _nextToken; private List<PolicyGeneration> _policyGenerations = new List<PolicyGeneration>(); /// <summary> /// Gets and sets the property NextToken. /// <para> /// A token used for pagination of results returned. /// </para> /// </summary> 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 PolicyGenerations. /// <para> /// A <code>PolicyGeneration</code> object that contains details about the generated policy. /// </para> /// </summary> [AWSProperty(Required=true)] public List<PolicyGeneration> PolicyGenerations { get { return this._policyGenerations; } set { this._policyGenerations = value; } } // Check to see if PolicyGenerations property is set internal bool IsSetPolicyGenerations() { return this._policyGenerations != null && this._policyGenerations.Count > 0; } } }
77
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Container for the parameters to the ListTagsForResource operation. /// Retrieves a list of tags applied to the specified resource. /// </summary> public partial class ListTagsForResourceRequest : AmazonAccessAnalyzerRequest { private string _resourceArn; /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The ARN of the resource to retrieve tags from. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceArn { get { return this._resourceArn; } set { this._resourceArn = value; } } // Check to see if ResourceArn property is set internal bool IsSetResourceArn() { return this._resourceArn != null; } } }
59
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The response to the request. /// </summary> public partial class ListTagsForResourceResponse : AmazonWebServiceResponse { private Dictionary<string, string> _tags = new Dictionary<string, string>(); /// <summary> /// Gets and sets the property Tags. /// <para> /// The tags that are applied to the specified resource. /// </para> /// </summary> public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// A location in a policy that is represented as a path through the JSON representation /// and a corresponding span. /// </summary> public partial class Location { private List<PathElement> _path = new List<PathElement>(); private Span _span; /// <summary> /// Gets and sets the property Path. /// <para> /// A path in a policy, represented as a sequence of path elements. /// </para> /// </summary> [AWSProperty(Required=true)] public List<PathElement> Path { get { return this._path; } set { this._path = value; } } // Check to see if Path property is set internal bool IsSetPath() { return this._path != null && this._path.Count > 0; } /// <summary> /// Gets and sets the property Span. /// <para> /// A span in a policy. /// </para> /// </summary> [AWSProperty(Required=true)] public Span Span { get { return this._span; } set { this._span = value; } } // Check to see if Span property is set internal bool IsSetSpan() { return this._span != null; } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The proposed <code>InternetConfiguration</code> or <code>VpcConfiguration</code> to /// apply to the Amazon S3 access point. <code>VpcConfiguration</code> does not apply /// to multi-region access points. You can make the access point accessible from the internet, /// or you can specify that all requests made through that access point must originate /// from a specific virtual private cloud (VPC). You can specify only one type of network /// configuration. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/creating-access-points.html">Creating /// access points</a>. /// </summary> public partial class NetworkOriginConfiguration { private InternetConfiguration _internetConfiguration; private VpcConfiguration _vpcConfiguration; /// <summary> /// Gets and sets the property InternetConfiguration. /// <para> /// The configuration for the Amazon S3 access point or multi-region access point with /// an <code>Internet</code> origin. /// </para> /// </summary> public InternetConfiguration InternetConfiguration { get { return this._internetConfiguration; } set { this._internetConfiguration = value; } } // Check to see if InternetConfiguration property is set internal bool IsSetInternetConfiguration() { return this._internetConfiguration != null; } /// <summary> /// Gets and sets the property VpcConfiguration. /// </summary> public VpcConfiguration VpcConfiguration { get { return this._vpcConfiguration; } set { this._vpcConfiguration = value; } } // Check to see if VpcConfiguration property is set internal bool IsSetVpcConfiguration() { return this._vpcConfiguration != null; } } }
80
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// A single element in a path through the JSON representation of a policy. /// </summary> public partial class PathElement { private int? _index; private string _key; private Substring _substring; private string _value; /// <summary> /// Gets and sets the property Index. /// <para> /// Refers to an index in a JSON array. /// </para> /// </summary> public int Index { get { return this._index.GetValueOrDefault(); } set { this._index = value; } } // Check to see if Index property is set internal bool IsSetIndex() { return this._index.HasValue; } /// <summary> /// Gets and sets the property Key. /// <para> /// Refers to a key in a JSON object. /// </para> /// </summary> public string Key { get { return this._key; } set { this._key = value; } } // Check to see if Key property is set internal bool IsSetKey() { return this._key != null; } /// <summary> /// Gets and sets the property Substring. /// <para> /// Refers to a substring of a literal string in a JSON object. /// </para> /// </summary> public Substring Substring { get { return this._substring; } set { this._substring = value; } } // Check to see if Substring property is set internal bool IsSetSubstring() { return this._substring != null; } /// <summary> /// Gets and sets the property Value. /// <para> /// Refers to the value associated with a given key in a JSON object. /// </para> /// </summary> public string Value { get { return this._value; } set { this._value = value; } } // Check to see if Value property is set internal bool IsSetValue() { return this._value != null; } } }
114
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Contains details about the policy generation status and properties. /// </summary> public partial class PolicyGeneration { private DateTime? _completedOn; private string _jobId; private string _principalArn; private DateTime? _startedOn; private JobStatus _status; /// <summary> /// Gets and sets the property CompletedOn. /// <para> /// A timestamp of when the policy generation was completed. /// </para> /// </summary> public DateTime CompletedOn { get { return this._completedOn.GetValueOrDefault(); } set { this._completedOn = value; } } // Check to see if CompletedOn property is set internal bool IsSetCompletedOn() { return this._completedOn.HasValue; } /// <summary> /// Gets and sets the property JobId. /// <para> /// The <code>JobId</code> that is returned by the <code>StartPolicyGeneration</code> /// operation. The <code>JobId</code> can be used with <code>GetGeneratedPolicy</code> /// to retrieve the generated policies or used with <code>CancelPolicyGeneration</code> /// to cancel the policy generation request. /// </para> /// </summary> [AWSProperty(Required=true)] public string JobId { get { return this._jobId; } set { this._jobId = value; } } // Check to see if JobId property is set internal bool IsSetJobId() { return this._jobId != null; } /// <summary> /// Gets and sets the property PrincipalArn. /// <para> /// The ARN of the IAM entity (user or role) for which you are generating a policy. /// </para> /// </summary> [AWSProperty(Required=true)] public string PrincipalArn { get { return this._principalArn; } set { this._principalArn = value; } } // Check to see if PrincipalArn property is set internal bool IsSetPrincipalArn() { return this._principalArn != null; } /// <summary> /// Gets and sets the property StartedOn. /// <para> /// A timestamp of when the policy generation started. /// </para> /// </summary> [AWSProperty(Required=true)] public DateTime StartedOn { get { return this._startedOn.GetValueOrDefault(); } set { this._startedOn = value; } } // Check to see if StartedOn property is set internal bool IsSetStartedOn() { return this._startedOn.HasValue; } /// <summary> /// Gets and sets the property Status. /// <para> /// The status of the policy generation request. /// </para> /// </summary> [AWSProperty(Required=true)] public JobStatus Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Contains the ARN details about the IAM entity for which the policy is generated. /// </summary> public partial class PolicyGenerationDetails { private string _principalArn; /// <summary> /// Gets and sets the property PrincipalArn. /// <para> /// The ARN of the IAM entity (user or role) for which you are generating a policy. /// </para> /// </summary> [AWSProperty(Required=true)] public string PrincipalArn { get { return this._principalArn; } set { this._principalArn = value; } } // Check to see if PrincipalArn property is set internal bool IsSetPrincipalArn() { return this._principalArn != null; } } }
58
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// A position in a policy. /// </summary> public partial class Position { private int? _column; private int? _line; private int? _offset; /// <summary> /// Gets and sets the property Column. /// <para> /// The column of the position, starting from 0. /// </para> /// </summary> [AWSProperty(Required=true)] public int Column { get { return this._column.GetValueOrDefault(); } set { this._column = value; } } // Check to see if Column property is set internal bool IsSetColumn() { return this._column.HasValue; } /// <summary> /// Gets and sets the property Line. /// <para> /// The line of the position, starting from 1. /// </para> /// </summary> [AWSProperty(Required=true)] public int Line { get { return this._line.GetValueOrDefault(); } set { this._line = value; } } // Check to see if Line property is set internal bool IsSetLine() { return this._line.HasValue; } /// <summary> /// Gets and sets the property Offset. /// <para> /// The offset within the policy that corresponds to the position, starting from 0. /// </para> /// </summary> [AWSProperty(Required=true)] public int Offset { get { return this._offset.GetValueOrDefault(); } set { this._offset = value; } } // Check to see if Offset property is set internal bool IsSetOffset() { return this._offset.HasValue; } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The values for a manual Amazon RDS DB cluster snapshot attribute. /// </summary> public partial class RdsDbClusterSnapshotAttributeValue { private List<string> _accountIds = new List<string>(); /// <summary> /// Gets and sets the property AccountIds. /// <para> /// The Amazon Web Services account IDs that have access to the manual Amazon RDS DB cluster /// snapshot. If the value <code>all</code> is specified, then the Amazon RDS DB cluster /// snapshot is public and can be copied or restored by all Amazon Web Services accounts. /// </para> /// <ul> <li> /// <para> /// If the configuration is for an existing Amazon RDS DB cluster snapshot and you do /// not specify the <code>accountIds</code> in <code>RdsDbClusterSnapshotAttributeValue</code>, /// then the access preview uses the existing shared <code>accountIds</code> for the snapshot. /// </para> /// </li> <li> /// <para> /// If the access preview is for a new resource and you do not specify the specify the /// <code>accountIds</code> in <code>RdsDbClusterSnapshotAttributeValue</code>, then the /// access preview considers the snapshot without any attributes. /// </para> /// </li> <li> /// <para> /// To propose deletion of existing shared <code>accountIds</code>, you can specify an /// empty list for <code>accountIds</code> in the <code>RdsDbClusterSnapshotAttributeValue</code>. /// </para> /// </li> </ul> /// </summary> public List<string> AccountIds { get { return this._accountIds; } set { this._accountIds = value; } } // Check to see if AccountIds property is set internal bool IsSetAccountIds() { return this._accountIds != null && this._accountIds.Count > 0; } } }
77
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The proposed access control configuration for an Amazon RDS DB cluster snapshot. You /// can propose a configuration for a new Amazon RDS DB cluster snapshot or an Amazon /// RDS DB cluster snapshot that you own by specifying the <code>RdsDbClusterSnapshotAttributeValue</code> /// and optional KMS encryption key. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBClusterSnapshotAttribute.html">ModifyDBClusterSnapshotAttribute</a>. /// </summary> public partial class RdsDbClusterSnapshotConfiguration { private Dictionary<string, RdsDbClusterSnapshotAttributeValue> _attributes = new Dictionary<string, RdsDbClusterSnapshotAttributeValue>(); private string _kmsKeyId; /// <summary> /// Gets and sets the property Attributes. /// <para> /// The names and values of manual DB cluster snapshot attributes. Manual DB cluster snapshot /// attributes are used to authorize other Amazon Web Services accounts to restore a manual /// DB cluster snapshot. The only valid value for <code>AttributeName</code> for the attribute /// map is <code>restore</code> /// </para> /// </summary> public Dictionary<string, RdsDbClusterSnapshotAttributeValue> Attributes { get { return this._attributes; } set { this._attributes = value; } } // Check to see if Attributes property is set internal bool IsSetAttributes() { return this._attributes != null && this._attributes.Count > 0; } /// <summary> /// Gets and sets the property KmsKeyId. /// <para> /// The KMS key identifier for an encrypted Amazon RDS DB cluster snapshot. The KMS key /// identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. /// </para> /// <ul> <li> /// <para> /// If the configuration is for an existing Amazon RDS DB cluster snapshot and you do /// not specify the <code>kmsKeyId</code>, or you specify an empty string, then the access /// preview uses the existing <code>kmsKeyId</code> of the snapshot. /// </para> /// </li> <li> /// <para> /// If the access preview is for a new resource and you do not specify the specify the /// <code>kmsKeyId</code>, then the access preview considers the snapshot as unencrypted. /// </para> /// </li> </ul> /// </summary> public string KmsKeyId { get { return this._kmsKeyId; } set { this._kmsKeyId = value; } } // Check to see if KmsKeyId property is set internal bool IsSetKmsKeyId() { return this._kmsKeyId != 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The name and values of a manual Amazon RDS DB snapshot attribute. Manual DB snapshot /// attributes are used to authorize other Amazon Web Services accounts to restore a manual /// DB snapshot. /// </summary> public partial class RdsDbSnapshotAttributeValue { private List<string> _accountIds = new List<string>(); /// <summary> /// Gets and sets the property AccountIds. /// <para> /// The Amazon Web Services account IDs that have access to the manual Amazon RDS DB snapshot. /// If the value <code>all</code> is specified, then the Amazon RDS DB snapshot is public /// and can be copied or restored by all Amazon Web Services accounts. /// </para> /// <ul> <li> /// <para> /// If the configuration is for an existing Amazon RDS DB snapshot and you do not specify /// the <code>accountIds</code> in <code>RdsDbSnapshotAttributeValue</code>, then the /// access preview uses the existing shared <code>accountIds</code> for the snapshot. /// </para> /// </li> <li> /// <para> /// If the access preview is for a new resource and you do not specify the specify the /// <code>accountIds</code> in <code>RdsDbSnapshotAttributeValue</code>, then the access /// preview considers the snapshot without any attributes. /// </para> /// </li> <li> /// <para> /// To propose deletion of an existing shared <code>accountIds</code>, you can specify /// an empty list for <code>accountIds</code> in the <code>RdsDbSnapshotAttributeValue</code>. /// </para> /// </li> </ul> /// </summary> public List<string> AccountIds { get { return this._accountIds; } set { this._accountIds = value; } } // Check to see if AccountIds property is set internal bool IsSetAccountIds() { return this._accountIds != null && this._accountIds.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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The proposed access control configuration for an Amazon RDS DB snapshot. You can propose /// a configuration for a new Amazon RDS DB snapshot or an Amazon RDS DB snapshot that /// you own by specifying the <code>RdsDbSnapshotAttributeValue</code> and optional KMS /// encryption key. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBSnapshotAttribute.html">ModifyDBSnapshotAttribute</a>. /// </summary> public partial class RdsDbSnapshotConfiguration { private Dictionary<string, RdsDbSnapshotAttributeValue> _attributes = new Dictionary<string, RdsDbSnapshotAttributeValue>(); private string _kmsKeyId; /// <summary> /// Gets and sets the property Attributes. /// <para> /// The names and values of manual DB snapshot attributes. Manual DB snapshot attributes /// are used to authorize other Amazon Web Services accounts to restore a manual DB snapshot. /// The only valid value for <code>attributeName</code> for the attribute map is restore. /// </para> /// </summary> public Dictionary<string, RdsDbSnapshotAttributeValue> Attributes { get { return this._attributes; } set { this._attributes = value; } } // Check to see if Attributes property is set internal bool IsSetAttributes() { return this._attributes != null && this._attributes.Count > 0; } /// <summary> /// Gets and sets the property KmsKeyId. /// <para> /// The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key identifier /// is the key ARN, key ID, alias ARN, or alias name for the KMS key. /// </para> /// <ul> <li> /// <para> /// If the configuration is for an existing Amazon RDS DB snapshot and you do not specify /// the <code>kmsKeyId</code>, or you specify an empty string, then the access preview /// uses the existing <code>kmsKeyId</code> of the snapshot. /// </para> /// </li> <li> /// <para> /// If the access preview is for a new resource and you do not specify the specify the /// <code>kmsKeyId</code>, then the access preview considers the snapshot as unencrypted. /// </para> /// </li> </ul> /// </summary> public string KmsKeyId { get { return this._kmsKeyId; } set { this._kmsKeyId = value; } } // Check to see if KmsKeyId property is set internal bool IsSetKmsKeyId() { return this._kmsKeyId != null; } } }
94
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The specified resource could not be found. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class ResourceNotFoundException : AmazonAccessAnalyzerException { private string _resourceId; private string _resourceType; /// <summary> /// Constructs a new ResourceNotFoundException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public ResourceNotFoundException(string message) : base(message) {} /// <summary> /// Construct instance of ResourceNotFoundException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public ResourceNotFoundException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of ResourceNotFoundException /// </summary> /// <param name="innerException"></param> public ResourceNotFoundException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of ResourceNotFoundException /// </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 ResourceNotFoundException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of ResourceNotFoundException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public ResourceNotFoundException(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 ResourceNotFoundException 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 ResourceNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.ResourceId = (string)info.GetValue("ResourceId", typeof(string)); this.ResourceType = (string)info.GetValue("ResourceType", typeof(string)); } /// <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); info.AddValue("ResourceId", this.ResourceId); info.AddValue("ResourceType", this.ResourceType); } #endif /// <summary> /// Gets and sets the property ResourceId. /// <para> /// The ID of the resource. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceId { get { return this._resourceId; } set { this._resourceId = value; } } // Check to see if ResourceId property is set internal bool IsSetResourceId() { return this._resourceId != null; } /// <summary> /// Gets and sets the property ResourceType. /// <para> /// The type of the resource. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceType { get { return this._resourceType; } set { this._resourceType = value; } } // Check to see if ResourceType property is set internal bool IsSetResourceType() { return this._resourceType != null; } } }
168
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The configuration for an Amazon S3 access point or multi-region access point for the /// bucket. You can propose up to 10 access points or multi-region access points per bucket. /// If the proposed Amazon S3 access point configuration is for an existing bucket, the /// access preview uses the proposed access point configuration in place of the existing /// access points. To propose an access point without a policy, you can provide an empty /// string as the access point policy. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/creating-access-points.html">Creating /// access points</a>. For more information about access point policy limits, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points-restrictions-limitations.html">Access /// points restrictions and limitations</a>. /// </summary> public partial class S3AccessPointConfiguration { private string _accessPointPolicy; private NetworkOriginConfiguration _networkOrigin; private S3PublicAccessBlockConfiguration _publicAccessBlock; /// <summary> /// Gets and sets the property AccessPointPolicy. /// <para> /// The access point or multi-region access point policy. /// </para> /// </summary> public string AccessPointPolicy { get { return this._accessPointPolicy; } set { this._accessPointPolicy = value; } } // Check to see if AccessPointPolicy property is set internal bool IsSetAccessPointPolicy() { return this._accessPointPolicy != null; } /// <summary> /// Gets and sets the property NetworkOrigin. /// <para> /// The proposed <code>Internet</code> and <code>VpcConfiguration</code> to apply to this /// Amazon S3 access point. <code>VpcConfiguration</code> does not apply to multi-region /// access points. If the access preview is for a new resource and neither is specified, /// the access preview uses <code>Internet</code> for the network origin. If the access /// preview is for an existing resource and neither is specified, the access preview uses /// the exiting network origin. /// </para> /// </summary> public NetworkOriginConfiguration NetworkOrigin { get { return this._networkOrigin; } set { this._networkOrigin = value; } } // Check to see if NetworkOrigin property is set internal bool IsSetNetworkOrigin() { return this._networkOrigin != null; } /// <summary> /// Gets and sets the property PublicAccessBlock. /// <para> /// The proposed <code>S3PublicAccessBlock</code> configuration to apply to this Amazon /// S3 access point or multi-region access point. /// </para> /// </summary> public S3PublicAccessBlockConfiguration PublicAccessBlock { get { return this._publicAccessBlock; } set { this._publicAccessBlock = value; } } // Check to see if PublicAccessBlock property is set internal bool IsSetPublicAccessBlock() { return this._publicAccessBlock != null; } } }
108
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// A proposed access control list grant configuration for an Amazon S3 bucket. For more /// information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#setting-acls">How /// to Specify an ACL</a>. /// </summary> public partial class S3BucketAclGrantConfiguration { private AclGrantee _grantee; private AclPermission _permission; /// <summary> /// Gets and sets the property Grantee. /// <para> /// The grantee to whom you’re assigning access rights. /// </para> /// </summary> [AWSProperty(Required=true)] public AclGrantee Grantee { get { return this._grantee; } set { this._grantee = value; } } // Check to see if Grantee property is set internal bool IsSetGrantee() { return this._grantee != null; } /// <summary> /// Gets and sets the property Permission. /// <para> /// The permissions being granted. /// </para> /// </summary> [AWSProperty(Required=true)] public AclPermission Permission { get { return this._permission; } set { this._permission = value; } } // Check to see if Permission property is set internal bool IsSetPermission() { return this._permission != null; } } }
80
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Proposed access control configuration for an Amazon S3 bucket. You can propose a configuration /// for a new Amazon S3 bucket or an existing Amazon S3 bucket that you own by specifying /// the Amazon S3 bucket policy, bucket ACLs, bucket BPA settings, Amazon S3 access points, /// and multi-region access points attached to the bucket. If the configuration is for /// an existing Amazon S3 bucket and you do not specify the Amazon S3 bucket policy, the /// access preview uses the existing policy attached to the bucket. If the access preview /// is for a new resource and you do not specify the Amazon S3 bucket policy, the access /// preview assumes a bucket without a policy. To propose deletion of an existing bucket /// policy, you can specify an empty string. For more information about bucket policy /// limits, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html">Bucket /// Policy Examples</a>. /// </summary> public partial class S3BucketConfiguration { private Dictionary<string, S3AccessPointConfiguration> _accessPoints = new Dictionary<string, S3AccessPointConfiguration>(); private List<S3BucketAclGrantConfiguration> _bucketAclGrants = new List<S3BucketAclGrantConfiguration>(); private string _bucketPolicy; private S3PublicAccessBlockConfiguration _bucketPublicAccessBlock; /// <summary> /// Gets and sets the property AccessPoints. /// <para> /// The configuration of Amazon S3 access points or multi-region access points for the /// bucket. You can propose up to 10 new access points per bucket. /// </para> /// </summary> public Dictionary<string, S3AccessPointConfiguration> AccessPoints { get { return this._accessPoints; } set { this._accessPoints = value; } } // Check to see if AccessPoints property is set internal bool IsSetAccessPoints() { return this._accessPoints != null && this._accessPoints.Count > 0; } /// <summary> /// Gets and sets the property BucketAclGrants. /// <para> /// The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 /// ACL grants per bucket. If the proposed grant configuration is for an existing bucket, /// the access preview uses the proposed list of grant configurations in place of the /// existing grants. Otherwise, the access preview uses the existing grants for the bucket. /// </para> /// </summary> public List<S3BucketAclGrantConfiguration> BucketAclGrants { get { return this._bucketAclGrants; } set { this._bucketAclGrants = value; } } // Check to see if BucketAclGrants property is set internal bool IsSetBucketAclGrants() { return this._bucketAclGrants != null && this._bucketAclGrants.Count > 0; } /// <summary> /// Gets and sets the property BucketPolicy. /// <para> /// The proposed bucket policy for the Amazon S3 bucket. /// </para> /// </summary> public string BucketPolicy { get { return this._bucketPolicy; } set { this._bucketPolicy = value; } } // Check to see if BucketPolicy property is set internal bool IsSetBucketPolicy() { return this._bucketPolicy != null; } /// <summary> /// Gets and sets the property BucketPublicAccessBlock. /// <para> /// The proposed block public access configuration for the Amazon S3 bucket. /// </para> /// </summary> public S3PublicAccessBlockConfiguration BucketPublicAccessBlock { get { return this._bucketPublicAccessBlock; } set { this._bucketPublicAccessBlock = value; } } // Check to see if BucketPublicAccessBlock property is set internal bool IsSetBucketPublicAccessBlock() { return this._bucketPublicAccessBlock != 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The <code>PublicAccessBlock</code> configuration to apply to this Amazon S3 bucket. /// If the proposed configuration is for an existing Amazon S3 bucket and the configuration /// is not specified, the access preview uses the existing setting. If the proposed configuration /// is for a new bucket and the configuration is not specified, the access preview uses /// <code>false</code>. If the proposed configuration is for a new access point or multi-region /// access point and the access point BPA configuration is not specified, the access preview /// uses <code>true</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html">PublicAccessBlockConfiguration</a>. /// </summary> public partial class S3PublicAccessBlockConfiguration { private bool? _ignorePublicAcls; private bool? _restrictPublicBuckets; /// <summary> /// Gets and sets the property IgnorePublicAcls. /// <para> /// Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects /// in this bucket. /// </para> /// </summary> [AWSProperty(Required=true)] public bool IgnorePublicAcls { get { return this._ignorePublicAcls.GetValueOrDefault(); } set { this._ignorePublicAcls = value; } } // Check to see if IgnorePublicAcls property is set internal bool IsSetIgnorePublicAcls() { return this._ignorePublicAcls.HasValue; } /// <summary> /// Gets and sets the property RestrictPublicBuckets. /// <para> /// Specifies whether Amazon S3 should restrict public bucket policies for this bucket. /// /// </para> /// </summary> [AWSProperty(Required=true)] public bool RestrictPublicBuckets { get { return this._restrictPublicBuckets.GetValueOrDefault(); } set { this._restrictPublicBuckets = value; } } // Check to see if RestrictPublicBuckets property is set internal bool IsSetRestrictPublicBuckets() { return this._restrictPublicBuckets.HasValue; } } }
86
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The configuration for a Secrets Manager secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_CreateSecret.html">CreateSecret</a>. /// /// /// <para> /// You can propose a configuration for a new secret or an existing secret that you own /// by specifying the secret policy and optional KMS encryption key. If the configuration /// is for an existing secret and you do not specify the secret policy, the access preview /// uses the existing policy for the secret. If the access preview is for a new resource /// and you do not specify the policy, the access preview assumes a secret without a policy. /// To propose deletion of an existing policy, you can specify an empty string. If the /// proposed configuration is for a new secret and you do not specify the KMS key ID, /// the access preview uses the Amazon Web Services managed key <code>aws/secretsmanager</code>. /// If you specify an empty string for the KMS key ID, the access preview uses the Amazon /// Web Services managed key of the Amazon Web Services account. For more information /// about secret policy limits, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_limits.html">Quotas /// for Secrets Manager.</a>. /// </para> /// </summary> public partial class SecretsManagerSecretConfiguration { private string _kmsKeyId; private string _secretPolicy; /// <summary> /// Gets and sets the property KmsKeyId. /// <para> /// The proposed ARN, key ID, or alias of the KMS key. /// </para> /// </summary> public string KmsKeyId { get { return this._kmsKeyId; } set { this._kmsKeyId = value; } } // Check to see if KmsKeyId property is set internal bool IsSetKmsKeyId() { return this._kmsKeyId != null; } /// <summary> /// Gets and sets the property SecretPolicy. /// <para> /// The proposed resource policy defining who can access or manage the secret. /// </para> /// </summary> public string SecretPolicy { get { return this._secretPolicy; } set { this._secretPolicy = value; } } // Check to see if SecretPolicy property is set internal bool IsSetSecretPolicy() { return this._secretPolicy != null; } } }
92
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Service quote met error. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class ServiceQuotaExceededException : AmazonAccessAnalyzerException { private string _resourceId; private string _resourceType; /// <summary> /// Constructs a new ServiceQuotaExceededException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public ServiceQuotaExceededException(string message) : base(message) {} /// <summary> /// Construct instance of ServiceQuotaExceededException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public ServiceQuotaExceededException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of ServiceQuotaExceededException /// </summary> /// <param name="innerException"></param> public ServiceQuotaExceededException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of ServiceQuotaExceededException /// </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 ServiceQuotaExceededException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of ServiceQuotaExceededException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public ServiceQuotaExceededException(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 ServiceQuotaExceededException 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 ServiceQuotaExceededException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.ResourceId = (string)info.GetValue("ResourceId", typeof(string)); this.ResourceType = (string)info.GetValue("ResourceType", typeof(string)); } /// <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); info.AddValue("ResourceId", this.ResourceId); info.AddValue("ResourceType", this.ResourceType); } #endif /// <summary> /// Gets and sets the property ResourceId. /// <para> /// The resource ID. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceId { get { return this._resourceId; } set { this._resourceId = value; } } // Check to see if ResourceId property is set internal bool IsSetResourceId() { return this._resourceId != null; } /// <summary> /// Gets and sets the property ResourceType. /// <para> /// The resource type. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceType { get { return this._resourceType; } set { this._resourceType = value; } } // Check to see if ResourceType property is set internal bool IsSetResourceType() { return this._resourceType != null; } } }
168
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The proposed access control configuration for an Amazon SNS topic. You can propose /// a configuration for a new Amazon SNS topic or an existing Amazon SNS topic that you /// own by specifying the policy. If the configuration is for an existing Amazon SNS topic /// and you do not specify the Amazon SNS policy, then the access preview uses the existing /// Amazon SNS policy for the topic. If the access preview is for a new resource and you /// do not specify the policy, then the access preview assumes an Amazon SNS topic without /// a policy. To propose deletion of an existing Amazon SNS topic policy, you can specify /// an empty string for the Amazon SNS policy. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_Topic.html">Topic</a>. /// </summary> public partial class SnsTopicConfiguration { private string _topicPolicy; /// <summary> /// Gets and sets the property TopicPolicy. /// <para> /// The JSON policy text that defines who can access an Amazon SNS topic. For more information, /// see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-access-policy-use-cases.html">Example /// cases for Amazon SNS access control</a> in the <i>Amazon SNS Developer Guide</i>. /// </para> /// </summary> [AWSProperty(Min=0, Max=30720)] public string TopicPolicy { get { return this._topicPolicy; } set { this._topicPolicy = value; } } // Check to see if TopicPolicy property is set internal bool IsSetTopicPolicy() { return this._topicPolicy != null; } } }
67
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The criteria used to sort. /// </summary> public partial class SortCriteria { private string _attributeName; private OrderBy _orderBy; /// <summary> /// Gets and sets the property AttributeName. /// <para> /// The name of the attribute to sort on. /// </para> /// </summary> public string AttributeName { get { return this._attributeName; } set { this._attributeName = value; } } // Check to see if AttributeName property is set internal bool IsSetAttributeName() { return this._attributeName != null; } /// <summary> /// Gets and sets the property OrderBy. /// <para> /// The sort order, ascending or descending. /// </para> /// </summary> public OrderBy OrderBy { get { return this._orderBy; } set { this._orderBy = value; } } // Check to see if OrderBy property is set internal bool IsSetOrderBy() { return this._orderBy != null; } } }
76
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// A span in a policy. The span consists of a start position (inclusive) and end position /// (exclusive). /// </summary> public partial class Span { private Position _end; private Position _start; /// <summary> /// Gets and sets the property End. /// <para> /// The end position of the span (exclusive). /// </para> /// </summary> [AWSProperty(Required=true)] public Position End { get { return this._end; } set { this._end = value; } } // Check to see if End property is set internal bool IsSetEnd() { return this._end != null; } /// <summary> /// Gets and sets the property Start. /// <para> /// The start position of the span (inclusive). /// </para> /// </summary> [AWSProperty(Required=true)] public Position Start { get { return this._start; } set { this._start = value; } } // Check to see if Start property is set internal bool IsSetStart() { return this._start != null; } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The proposed access control configuration for an Amazon SQS queue. You can propose /// a configuration for a new Amazon SQS queue or an existing Amazon SQS queue that you /// own by specifying the Amazon SQS policy. If the configuration is for an existing Amazon /// SQS queue and you do not specify the Amazon SQS policy, the access preview uses the /// existing Amazon SQS policy for the queue. If the access preview is for a new resource /// and you do not specify the policy, the access preview assumes an Amazon SQS queue /// without a policy. To propose deletion of an existing Amazon SQS queue policy, you /// can specify an empty string for the Amazon SQS policy. For more information about /// Amazon SQS policy limits, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-policies.html">Quotas /// related to policies</a>. /// </summary> public partial class SqsQueueConfiguration { private string _queuePolicy; /// <summary> /// Gets and sets the property QueuePolicy. /// <para> /// The proposed resource policy for the Amazon SQS queue. /// </para> /// </summary> public string QueuePolicy { get { return this._queuePolicy; } set { this._queuePolicy = value; } } // Check to see if QueuePolicy property is set internal bool IsSetQueuePolicy() { return this._queuePolicy != null; } } }
66
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Container for the parameters to the StartPolicyGeneration operation. /// Starts the policy generation request. /// </summary> public partial class StartPolicyGenerationRequest : AmazonAccessAnalyzerRequest { private string _clientToken; private CloudTrailDetails _cloudTrailDetails; private PolicyGenerationDetails _policyGenerationDetails; /// <summary> /// Gets and sets the property ClientToken. /// <para> /// A unique, case-sensitive identifier that you provide to ensure the idempotency of /// the request. Idempotency ensures that an API request completes only once. With an /// idempotent request, if the original request completes successfully, the subsequent /// retries with the same client token return the result from the original successful /// request and they have no additional effect. /// </para> /// /// <para> /// If you do not specify a client token, one is automatically generated by the Amazon /// Web Services SDK. /// </para> /// </summary> public string ClientToken { get { return this._clientToken; } set { this._clientToken = value; } } // Check to see if ClientToken property is set internal bool IsSetClientToken() { return this._clientToken != null; } /// <summary> /// Gets and sets the property CloudTrailDetails. /// <para> /// A <code>CloudTrailDetails</code> object that contains details about a <code>Trail</code> /// that you want to analyze to generate policies. /// </para> /// </summary> public CloudTrailDetails CloudTrailDetails { get { return this._cloudTrailDetails; } set { this._cloudTrailDetails = value; } } // Check to see if CloudTrailDetails property is set internal bool IsSetCloudTrailDetails() { return this._cloudTrailDetails != null; } /// <summary> /// Gets and sets the property PolicyGenerationDetails. /// <para> /// Contains the ARN of the IAM entity (user or role) for which you are generating a policy. /// </para> /// </summary> [AWSProperty(Required=true)] public PolicyGenerationDetails PolicyGenerationDetails { get { return this._policyGenerationDetails; } set { this._policyGenerationDetails = value; } } // Check to see if PolicyGenerationDetails property is set internal bool IsSetPolicyGenerationDetails() { return this._policyGenerationDetails != null; } } }
107
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// This is the response object from the StartPolicyGeneration operation. /// </summary> public partial class StartPolicyGenerationResponse : AmazonWebServiceResponse { private string _jobId; /// <summary> /// Gets and sets the property JobId. /// <para> /// The <code>JobId</code> that is returned by the <code>StartPolicyGeneration</code> /// operation. The <code>JobId</code> can be used with <code>GetGeneratedPolicy</code> /// to retrieve the generated policies or used with <code>CancelPolicyGeneration</code> /// to cancel the policy generation request. /// </para> /// </summary> [AWSProperty(Required=true)] public string JobId { get { return this._jobId; } set { this._jobId = value; } } // Check to see if JobId property is set internal bool IsSetJobId() { return this._jobId != null; } } }
61
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Container for the parameters to the StartResourceScan operation. /// Immediately starts a scan of the policies applied to the specified resource. /// </summary> public partial class StartResourceScanRequest : AmazonAccessAnalyzerRequest { private string _analyzerArn; private string _resourceArn; private string _resourceOwnerAccount; /// <summary> /// Gets and sets the property AnalyzerArn. /// <para> /// The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources">ARN /// of the analyzer</a> to use to scan the policies applied to the specified resource. /// </para> /// </summary> [AWSProperty(Required=true)] public string AnalyzerArn { get { return this._analyzerArn; } set { this._analyzerArn = value; } } // Check to see if AnalyzerArn property is set internal bool IsSetAnalyzerArn() { return this._analyzerArn != null; } /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The ARN of the resource to scan. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceArn { get { return this._resourceArn; } set { this._resourceArn = value; } } // Check to see if ResourceArn property is set internal bool IsSetResourceArn() { return this._resourceArn != null; } /// <summary> /// Gets and sets the property ResourceOwnerAccount. /// <para> /// The Amazon Web Services account ID that owns the resource. For most Amazon Web Services /// resources, the owning account is the account in which the resource was created. /// </para> /// </summary> public string ResourceOwnerAccount { get { return this._resourceOwnerAccount; } set { this._resourceOwnerAccount = value; } } // Check to see if ResourceOwnerAccount property is set internal bool IsSetResourceOwnerAccount() { return this._resourceOwnerAccount != null; } } }
100
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// This is the response object from the StartResourceScan operation. /// </summary> public partial class StartResourceScanResponse : 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Provides more details about the current status of the analyzer. For example, if the /// creation for the analyzer fails, a <code>Failed</code> status is returned. For an /// analyzer with organization as the type, this failure can be due to an issue with creating /// the service-linked roles required in the member accounts of the Amazon Web Services /// organization. /// </summary> public partial class StatusReason { private ReasonCode _code; /// <summary> /// Gets and sets the property Code. /// <para> /// The reason code for the current status of the analyzer. /// </para> /// </summary> [AWSProperty(Required=true)] public ReasonCode Code { get { return this._code; } set { this._code = value; } } // Check to see if Code property is set internal bool IsSetCode() { return this._code != null; } } }
62
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// A reference to a substring of a literal string in a JSON document. /// </summary> public partial class Substring { private int? _length; private int? _start; /// <summary> /// Gets and sets the property Length. /// <para> /// The length of the substring. /// </para> /// </summary> [AWSProperty(Required=true)] public int Length { get { return this._length.GetValueOrDefault(); } set { this._length = value; } } // Check to see if Length property is set internal bool IsSetLength() { return this._length.HasValue; } /// <summary> /// Gets and sets the property Start. /// <para> /// The start index of the substring, starting from 0. /// </para> /// </summary> [AWSProperty(Required=true)] public int 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; } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Container for the parameters to the TagResource operation. /// Adds a tag to the specified resource. /// </summary> public partial class TagResourceRequest : AmazonAccessAnalyzerRequest { private string _resourceArn; private Dictionary<string, string> _tags = new Dictionary<string, string>(); /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The ARN of the resource to add the tag to. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceArn { get { return this._resourceArn; } set { this._resourceArn = value; } } // Check to see if ResourceArn property is set internal bool IsSetResourceArn() { return this._resourceArn != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The tags to add to the resource. /// </para> /// </summary> [AWSProperty(Required=true)] public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The response to the request. /// </summary> public partial class TagResourceResponse : 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Throttling limit exceeded error. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class ThrottlingException : AmazonAccessAnalyzerException { private int? _retryAfterSeconds; private RetryableDetails _retryableDetails = new RetryableDetails(true); /// <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) { this.RetryAfterSeconds = (int)info.GetValue("RetryAfterSeconds", typeof(int)); } /// <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); info.AddValue("RetryAfterSeconds", this.RetryAfterSeconds); } #endif /// <summary> /// Gets and sets the property RetryAfterSeconds. /// <para> /// The seconds to wait to retry. /// </para> /// </summary> public int RetryAfterSeconds { get { return this._retryAfterSeconds.GetValueOrDefault(); } set { this._retryAfterSeconds = value; } } // Check to see if RetryAfterSeconds property is set internal bool IsSetRetryAfterSeconds() { return this._retryAfterSeconds.HasValue; } /// <summary> /// Flag indicating if the exception is retryable and the associated retry /// details. A null value indicates that the exception is not retryable. /// </summary> public override RetryableDetails Retryable { get { return _retryableDetails; } } } }
158
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Contains details about the CloudTrail trail being analyzed to generate a policy. /// </summary> public partial class Trail { private bool? _allRegions; private string _cloudTrailArn; private List<string> _regions = new List<string>(); /// <summary> /// Gets and sets the property AllRegions. /// <para> /// Possible values are <code>true</code> or <code>false</code>. If set to <code>true</code>, /// IAM Access Analyzer retrieves CloudTrail data from all regions to analyze and generate /// a policy. /// </para> /// </summary> public bool AllRegions { get { return this._allRegions.GetValueOrDefault(); } set { this._allRegions = value; } } // Check to see if AllRegions property is set internal bool IsSetAllRegions() { return this._allRegions.HasValue; } /// <summary> /// Gets and sets the property CloudTrailArn. /// <para> /// Specifies the ARN of the trail. The format of a trail ARN is <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>. /// </para> /// </summary> [AWSProperty(Required=true)] public string CloudTrailArn { get { return this._cloudTrailArn; } set { this._cloudTrailArn = value; } } // Check to see if CloudTrailArn property is set internal bool IsSetCloudTrailArn() { return this._cloudTrailArn != null; } /// <summary> /// Gets and sets the property Regions. /// <para> /// A list of regions to get CloudTrail data from and analyze to generate a policy. /// </para> /// </summary> public List<string> Regions { get { return this._regions; } set { this._regions = value; } } // Check to see if Regions property is set internal bool IsSetRegions() { return this._regions != null && this._regions.Count > 0; } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Contains details about the CloudTrail trail being analyzed to generate a policy. /// </summary> public partial class TrailProperties { private bool? _allRegions; private string _cloudTrailArn; private List<string> _regions = new List<string>(); /// <summary> /// Gets and sets the property AllRegions. /// <para> /// Possible values are <code>true</code> or <code>false</code>. If set to <code>true</code>, /// IAM Access Analyzer retrieves CloudTrail data from all regions to analyze and generate /// a policy. /// </para> /// </summary> public bool AllRegions { get { return this._allRegions.GetValueOrDefault(); } set { this._allRegions = value; } } // Check to see if AllRegions property is set internal bool IsSetAllRegions() { return this._allRegions.HasValue; } /// <summary> /// Gets and sets the property CloudTrailArn. /// <para> /// Specifies the ARN of the trail. The format of a trail ARN is <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>. /// </para> /// </summary> [AWSProperty(Required=true)] public string CloudTrailArn { get { return this._cloudTrailArn; } set { this._cloudTrailArn = value; } } // Check to see if CloudTrailArn property is set internal bool IsSetCloudTrailArn() { return this._cloudTrailArn != null; } /// <summary> /// Gets and sets the property Regions. /// <para> /// A list of regions to get CloudTrail data from and analyze to generate a policy. /// </para> /// </summary> public List<string> Regions { get { return this._regions; } set { this._regions = value; } } // Check to see if Regions property is set internal bool IsSetRegions() { return this._regions != null && this._regions.Count > 0; } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Container for the parameters to the UntagResource operation. /// Removes a tag from the specified resource. /// </summary> public partial class UntagResourceRequest : AmazonAccessAnalyzerRequest { private string _resourceArn; private List<string> _tagKeys = new List<string>(); /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The ARN of the resource to remove the tag from. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceArn { get { return this._resourceArn; } set { this._resourceArn = value; } } // Check to see if ResourceArn property is set internal bool IsSetResourceArn() { return this._resourceArn != null; } /// <summary> /// Gets and sets the property TagKeys. /// <para> /// The key for the tag to add. /// </para> /// </summary> [AWSProperty(Required=true)] public List<string> TagKeys { get { return this._tagKeys; } set { this._tagKeys = value; } } // Check to see if TagKeys property is set internal bool IsSetTagKeys() { return this._tagKeys != null && this._tagKeys.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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The response to the request. /// </summary> public partial class UntagResourceResponse : 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Container for the parameters to the UpdateArchiveRule operation. /// Updates the criteria and values for the specified archive rule. /// </summary> public partial class UpdateArchiveRuleRequest : AmazonAccessAnalyzerRequest { private string _analyzerName; private string _clientToken; private Dictionary<string, Criterion> _filter = new Dictionary<string, Criterion>(); private string _ruleName; /// <summary> /// Gets and sets the property AnalyzerName. /// <para> /// The name of the analyzer to update the archive rules for. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=255)] public string AnalyzerName { get { return this._analyzerName; } set { this._analyzerName = value; } } // Check to see if AnalyzerName property is set internal bool IsSetAnalyzerName() { return this._analyzerName != null; } /// <summary> /// Gets and sets the property ClientToken. /// <para> /// A client token. /// </para> /// </summary> public string ClientToken { get { return this._clientToken; } set { this._clientToken = value; } } // Check to see if ClientToken property is set internal bool IsSetClientToken() { return this._clientToken != null; } /// <summary> /// Gets and sets the property Filter. /// <para> /// A filter to match for the rules to update. Only rules that match the filter are updated. /// </para> /// </summary> [AWSProperty(Required=true)] public Dictionary<string, Criterion> Filter { get { return this._filter; } set { this._filter = value; } } // Check to see if Filter property is set internal bool IsSetFilter() { return this._filter != null && this._filter.Count > 0; } /// <summary> /// Gets and sets the property RuleName. /// <para> /// The name of the rule to update. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=255)] public string RuleName { get { return this._ruleName; } set { this._ruleName = value; } } // Check to see if RuleName property is set internal bool IsSetRuleName() { return this._ruleName != null; } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// This is the response object from the UpdateArchiveRule operation. /// </summary> public partial class UpdateArchiveRuleResponse : 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Container for the parameters to the UpdateFindings operation. /// Updates the status for the specified findings. /// </summary> public partial class UpdateFindingsRequest : AmazonAccessAnalyzerRequest { private string _analyzerArn; private string _clientToken; private List<string> _ids = new List<string>(); private string _resourceArn; private FindingStatusUpdate _status; /// <summary> /// Gets and sets the property AnalyzerArn. /// <para> /// The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources">ARN /// of the analyzer</a> that generated the findings to update. /// </para> /// </summary> [AWSProperty(Required=true)] public string AnalyzerArn { get { return this._analyzerArn; } set { this._analyzerArn = value; } } // Check to see if AnalyzerArn property is set internal bool IsSetAnalyzerArn() { return this._analyzerArn != null; } /// <summary> /// Gets and sets the property ClientToken. /// <para> /// A client token. /// </para> /// </summary> public string ClientToken { get { return this._clientToken; } set { this._clientToken = value; } } // Check to see if ClientToken property is set internal bool IsSetClientToken() { return this._clientToken != null; } /// <summary> /// Gets and sets the property Ids. /// <para> /// The IDs of the findings to update. /// </para> /// </summary> public List<string> Ids { get { return this._ids; } set { this._ids = value; } } // Check to see if Ids property is set internal bool IsSetIds() { return this._ids != null && this._ids.Count > 0; } /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The ARN of the resource identified in the finding. /// </para> /// </summary> public string ResourceArn { get { return this._resourceArn; } set { this._resourceArn = value; } } // Check to see if ResourceArn property is set internal bool IsSetResourceArn() { return this._resourceArn != null; } /// <summary> /// Gets and sets the property Status. /// <para> /// The state represents the action to take to update the finding Status. Use <code>ARCHIVE</code> /// to change an Active finding to an Archived finding. Use <code>ACTIVE</code> to change /// an Archived finding to an Active finding. /// </para> /// </summary> [AWSProperty(Required=true)] public FindingStatusUpdate Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != null; } } }
139
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// This is the response object from the UpdateFindings operation. /// </summary> public partial class UpdateFindingsResponse : 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// A finding in a policy. Each finding is an actionable recommendation that can be used /// to improve the policy. /// </summary> public partial class ValidatePolicyFinding { private string _findingDetails; private ValidatePolicyFindingType _findingType; private string _issueCode; private string _learnMoreLink; private List<Location> _locations = new List<Location>(); /// <summary> /// Gets and sets the property FindingDetails. /// <para> /// A localized message that explains the finding and provides guidance on how to address /// it. /// </para> /// </summary> [AWSProperty(Required=true)] public string FindingDetails { get { return this._findingDetails; } set { this._findingDetails = value; } } // Check to see if FindingDetails property is set internal bool IsSetFindingDetails() { return this._findingDetails != null; } /// <summary> /// Gets and sets the property FindingType. /// <para> /// The impact of the finding. /// </para> /// /// <para> /// Security warnings report when the policy allows access that we consider overly permissive. /// </para> /// /// <para> /// Errors report when a part of the policy is not functional. /// </para> /// /// <para> /// Warnings report non-security issues when a policy does not conform to policy writing /// best practices. /// </para> /// /// <para> /// Suggestions recommend stylistic improvements in the policy that do not impact access. /// </para> /// </summary> [AWSProperty(Required=true)] public ValidatePolicyFindingType FindingType { get { return this._findingType; } set { this._findingType = value; } } // Check to see if FindingType property is set internal bool IsSetFindingType() { return this._findingType != null; } /// <summary> /// Gets and sets the property IssueCode. /// <para> /// The issue code provides an identifier of the issue associated with this finding. /// </para> /// </summary> [AWSProperty(Required=true)] public string IssueCode { get { return this._issueCode; } set { this._issueCode = value; } } // Check to see if IssueCode property is set internal bool IsSetIssueCode() { return this._issueCode != null; } /// <summary> /// Gets and sets the property LearnMoreLink. /// <para> /// A link to additional documentation about the type of finding. /// </para> /// </summary> [AWSProperty(Required=true)] public string LearnMoreLink { get { return this._learnMoreLink; } set { this._learnMoreLink = value; } } // Check to see if LearnMoreLink property is set internal bool IsSetLearnMoreLink() { return this._learnMoreLink != null; } /// <summary> /// Gets and sets the property Locations. /// <para> /// The list of locations in the policy document that are related to the finding. The /// issue code provides a summary of an issue identified by the finding. /// </para> /// </summary> [AWSProperty(Required=true)] public List<Location> Locations { get { return this._locations; } set { this._locations = value; } } // Check to see if Locations property is set internal bool IsSetLocations() { return this._locations != null && this._locations.Count > 0; } } }
158
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Container for the parameters to the ValidatePolicy operation. /// Requests the validation of a policy and returns a list of findings. The findings help /// you identify issues and provide actionable recommendations to resolve the issue and /// enable you to author functional policies that meet security best practices. /// </summary> public partial class ValidatePolicyRequest : AmazonAccessAnalyzerRequest { private Locale _locale; private int? _maxResults; private string _nextToken; private string _policyDocument; private PolicyType _policyType; private ValidatePolicyResourceType _validatePolicyResourceType; /// <summary> /// Gets and sets the property Locale. /// <para> /// The locale to use for localizing the findings. /// </para> /// </summary> public Locale Locale { get { return this._locale; } set { this._locale = value; } } // Check to see if Locale property is set internal bool IsSetLocale() { return this._locale != null; } /// <summary> /// Gets and sets the property MaxResults. /// <para> /// The maximum number of results to return in the response. /// </para> /// </summary> 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> /// A token used for pagination of results returned. /// </para> /// </summary> 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 PolicyDocument. /// <para> /// The JSON policy document to use as the content for the policy. /// </para> /// </summary> [AWSProperty(Required=true)] public string PolicyDocument { get { return this._policyDocument; } set { this._policyDocument = value; } } // Check to see if PolicyDocument property is set internal bool IsSetPolicyDocument() { return this._policyDocument != null; } /// <summary> /// Gets and sets the property PolicyType. /// <para> /// The type of policy to validate. Identity policies grant permissions to IAM principals. /// Identity policies include managed and inline policies for IAM roles, users, and groups. /// They also include service-control policies (SCPs) that are attached to an Amazon Web /// Services organization, organizational unit (OU), or an account. /// </para> /// /// <para> /// Resource policies grant permissions on Amazon Web Services resources. Resource policies /// include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You /// can provide a generic input such as identity policy or resource policy or a specific /// input such as managed policy or Amazon S3 bucket policy. /// </para> /// </summary> [AWSProperty(Required=true)] public PolicyType PolicyType { get { return this._policyType; } set { this._policyType = value; } } // Check to see if PolicyType property is set internal bool IsSetPolicyType() { return this._policyType != null; } /// <summary> /// Gets and sets the property ValidatePolicyResourceType. /// <para> /// The type of resource to attach to your resource policy. Specify a value for the policy /// validation resource type only if the policy type is <code>RESOURCE_POLICY</code>. /// For example, to validate a resource policy to attach to an Amazon S3 bucket, you can /// choose <code>AWS::S3::Bucket</code> for the policy validation resource type. /// </para> /// /// <para> /// For resource types not supported as valid values, IAM Access Analyzer runs policy /// checks that apply to all resource policies. For example, to validate a resource policy /// to attach to a KMS key, do not specify a value for the policy validation resource /// type and IAM Access Analyzer will run policy checks that apply to all resource policies. /// </para> /// </summary> public ValidatePolicyResourceType ValidatePolicyResourceType { get { return this._validatePolicyResourceType; } set { this._validatePolicyResourceType = value; } } // Check to see if ValidatePolicyResourceType property is set internal bool IsSetValidatePolicyResourceType() { return this._validatePolicyResourceType != null; } } }
177
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// This is the response object from the ValidatePolicy operation. /// </summary> public partial class ValidatePolicyResponse : AmazonWebServiceResponse { private List<ValidatePolicyFinding> _findings = new List<ValidatePolicyFinding>(); private string _nextToken; /// <summary> /// Gets and sets the property Findings. /// <para> /// The list of findings in a policy returned by IAM Access Analyzer based on its suite /// of policy checks. /// </para> /// </summary> [AWSProperty(Required=true)] public List<ValidatePolicyFinding> Findings { get { return this._findings; } set { this._findings = value; } } // Check to see if Findings property is set internal bool IsSetFindings() { return this._findings != null && this._findings.Count > 0; } /// <summary> /// Gets and sets the property NextToken. /// <para> /// A token used for pagination of results returned. /// </para> /// </summary> 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Validation exception error. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class ValidationException : AmazonAccessAnalyzerException { private List<ValidationExceptionField> _fieldList = new List<ValidationExceptionField>(); private ValidationExceptionReason _reason; /// <summary> /// Constructs a new ValidationException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public ValidationException(string message) : base(message) {} /// <summary> /// Construct instance of ValidationException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public ValidationException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of ValidationException /// </summary> /// <param name="innerException"></param> public ValidationException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of ValidationException /// </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 ValidationException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of ValidationException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public ValidationException(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 ValidationException 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 ValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.FieldList = (List<ValidationExceptionField>)info.GetValue("FieldList", typeof(List<ValidationExceptionField>)); this.Reason = (ValidationExceptionReason)info.GetValue("Reason", typeof(ValidationExceptionReason)); } /// <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); info.AddValue("FieldList", this.FieldList); info.AddValue("Reason", this.Reason); } #endif /// <summary> /// Gets and sets the property FieldList. /// <para> /// A list of fields that didn't validate. /// </para> /// </summary> public List<ValidationExceptionField> FieldList { get { return this._fieldList; } set { this._fieldList = value; } } // Check to see if FieldList property is set internal bool IsSetFieldList() { return this._fieldList != null && this._fieldList.Count > 0; } /// <summary> /// Gets and sets the property Reason. /// <para> /// The reason for the exception. /// </para> /// </summary> [AWSProperty(Required=true)] public ValidationExceptionReason Reason { get { return this._reason; } set { this._reason = value; } } // Check to see if Reason property is set internal bool IsSetReason() { return this._reason != null; } } }
167
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Contains information about a validation exception. /// </summary> public partial class ValidationExceptionField { private string _message; private string _name; /// <summary> /// Gets and sets the property Message. /// <para> /// A message about the validation exception. /// </para> /// </summary> [AWSProperty(Required=true)] public string Message { get { return this._message; } set { this._message = value; } } // Check to see if Message property is set internal bool IsSetMessage() { return this._message != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the validation exception. /// </para> /// </summary> [AWSProperty(Required=true)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// The proposed virtual private cloud (VPC) configuration for the Amazon S3 access point. /// VPC configuration does not apply to multi-region access points. For more information, /// see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_VpcConfiguration.html">VpcConfiguration</a>. /// </summary> public partial class VpcConfiguration { private string _vpcId; /// <summary> /// Gets and sets the property VpcId. /// <para> /// If this field is specified, this access point will only allow connections from the /// specified VPC ID. /// </para> /// </summary> [AWSProperty(Required=true)] public string VpcId { get { return this._vpcId; } set { this._vpcId = value; } } // Check to see if VpcId property is set internal bool IsSetVpcId() { return this._vpcId != null; } } }
61
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AccessPreviewFinding Object /// </summary> public class AccessPreviewFindingUnmarshaller : IUnmarshaller<AccessPreviewFinding, XmlUnmarshallerContext>, IUnmarshaller<AccessPreviewFinding, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AccessPreviewFinding IUnmarshaller<AccessPreviewFinding, 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 AccessPreviewFinding Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AccessPreviewFinding unmarshalledObject = new AccessPreviewFinding(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("action", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.Action = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("changeType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ChangeType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("condition", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Condition = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("error", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Error = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("existingFindingId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ExistingFindingId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("existingFindingStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ExistingFindingStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("isPublic", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsPublic = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("principal", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Principal = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resource", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Resource = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceOwnerAccount", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceOwnerAccount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("sources", targetDepth)) { var unmarshaller = new ListUnmarshaller<FindingSource, FindingSourceUnmarshaller>(FindingSourceUnmarshaller.Instance); unmarshalledObject.Sources = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AccessPreviewFindingUnmarshaller _instance = new AccessPreviewFindingUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AccessPreviewFindingUnmarshaller Instance { get { return _instance; } } } }
176
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AccessPreviewStatusReason Object /// </summary> public class AccessPreviewStatusReasonUnmarshaller : IUnmarshaller<AccessPreviewStatusReason, XmlUnmarshallerContext>, IUnmarshaller<AccessPreviewStatusReason, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AccessPreviewStatusReason IUnmarshaller<AccessPreviewStatusReason, 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 AccessPreviewStatusReason Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AccessPreviewStatusReason unmarshalledObject = new AccessPreviewStatusReason(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("code", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Code = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AccessPreviewStatusReasonUnmarshaller _instance = new AccessPreviewStatusReasonUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AccessPreviewStatusReasonUnmarshaller Instance { get { return _instance; } } } }
92
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AccessPreviewSummary Object /// </summary> public class AccessPreviewSummaryUnmarshaller : IUnmarshaller<AccessPreviewSummary, XmlUnmarshallerContext>, IUnmarshaller<AccessPreviewSummary, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AccessPreviewSummary IUnmarshaller<AccessPreviewSummary, 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 AccessPreviewSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AccessPreviewSummary unmarshalledObject = new AccessPreviewSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("analyzerArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AnalyzerArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("statusReason", targetDepth)) { var unmarshaller = AccessPreviewStatusReasonUnmarshaller.Instance; unmarshalledObject.StatusReason = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AccessPreviewSummaryUnmarshaller _instance = new AccessPreviewSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AccessPreviewSummaryUnmarshaller Instance { get { return _instance; } } } }
116
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AccessPreview Object /// </summary> public class AccessPreviewUnmarshaller : IUnmarshaller<AccessPreview, XmlUnmarshallerContext>, IUnmarshaller<AccessPreview, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AccessPreview IUnmarshaller<AccessPreview, 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 AccessPreview Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AccessPreview unmarshalledObject = new AccessPreview(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("analyzerArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AnalyzerArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("configurations", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, Configuration, StringUnmarshaller, ConfigurationUnmarshaller>(StringUnmarshaller.Instance, ConfigurationUnmarshaller.Instance); unmarshalledObject.Configurations = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("statusReason", targetDepth)) { var unmarshaller = AccessPreviewStatusReasonUnmarshaller.Instance; unmarshalledObject.StatusReason = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AccessPreviewUnmarshaller _instance = new AccessPreviewUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AccessPreviewUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// AclGrantee Marshaller /// </summary> public class AclGranteeMarshaller : IRequestMarshaller<AclGrantee, 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(AclGrantee requestObject, JsonMarshallerContext context) { if(requestObject.IsSetId()) { context.Writer.WritePropertyName("id"); context.Writer.Write(requestObject.Id); } if(requestObject.IsSetUri()) { context.Writer.WritePropertyName("uri"); context.Writer.Write(requestObject.Uri); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static AclGranteeMarshaller Instance = new AclGranteeMarshaller(); } }
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AclGrantee Object /// </summary> public class AclGranteeUnmarshaller : IUnmarshaller<AclGrantee, XmlUnmarshallerContext>, IUnmarshaller<AclGrantee, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AclGrantee IUnmarshaller<AclGrantee, 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 AclGrantee Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AclGrantee unmarshalledObject = new AclGrantee(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("uri", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Uri = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AclGranteeUnmarshaller _instance = new AclGranteeUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AclGranteeUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AnalyzedResourceSummary Object /// </summary> public class AnalyzedResourceSummaryUnmarshaller : IUnmarshaller<AnalyzedResourceSummary, XmlUnmarshallerContext>, IUnmarshaller<AnalyzedResourceSummary, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AnalyzedResourceSummary IUnmarshaller<AnalyzedResourceSummary, 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 AnalyzedResourceSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AnalyzedResourceSummary unmarshalledObject = new AnalyzedResourceSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("resourceArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceOwnerAccount", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceOwnerAccount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceType = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AnalyzedResourceSummaryUnmarshaller _instance = new AnalyzedResourceSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AnalyzedResourceSummaryUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AnalyzedResource Object /// </summary> public class AnalyzedResourceUnmarshaller : IUnmarshaller<AnalyzedResource, XmlUnmarshallerContext>, IUnmarshaller<AnalyzedResource, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AnalyzedResource IUnmarshaller<AnalyzedResource, 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 AnalyzedResource Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AnalyzedResource unmarshalledObject = new AnalyzedResource(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("actions", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.Actions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("analyzedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.AnalyzedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("error", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Error = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("isPublic", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsPublic = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceOwnerAccount", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceOwnerAccount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("sharedVia", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.SharedVia = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("updatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.UpdatedAt = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AnalyzedResourceUnmarshaller _instance = new AnalyzedResourceUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AnalyzedResourceUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AnalyzerSummary Object /// </summary> public class AnalyzerSummaryUnmarshaller : IUnmarshaller<AnalyzerSummary, XmlUnmarshallerContext>, IUnmarshaller<AnalyzerSummary, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AnalyzerSummary IUnmarshaller<AnalyzerSummary, 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 AnalyzerSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AnalyzerSummary unmarshalledObject = new AnalyzerSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastResourceAnalyzed", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LastResourceAnalyzed = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastResourceAnalyzedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastResourceAnalyzedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("statusReason", targetDepth)) { var unmarshaller = StatusReasonUnmarshaller.Instance; unmarshalledObject.StatusReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AnalyzerSummaryUnmarshaller _instance = new AnalyzerSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AnalyzerSummaryUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// ApplyArchiveRule Request Marshaller /// </summary> public class ApplyArchiveRuleRequestMarshaller : IMarshaller<IRequest, ApplyArchiveRuleRequest> , 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((ApplyArchiveRuleRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ApplyArchiveRuleRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "PUT"; request.ResourcePath = "/archive-rule"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAnalyzerArn()) { context.Writer.WritePropertyName("analyzerArn"); context.Writer.Write(publicRequest.AnalyzerArn); } if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetRuleName()) { context.Writer.WritePropertyName("ruleName"); context.Writer.Write(publicRequest.RuleName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static ApplyArchiveRuleRequestMarshaller _instance = new ApplyArchiveRuleRequestMarshaller(); internal static ApplyArchiveRuleRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ApplyArchiveRuleRequestMarshaller Instance { get { return _instance; } } } }
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ApplyArchiveRule operation /// </summary> public class ApplyArchiveRuleResponseUnmarshaller : 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) { ApplyArchiveRuleResponse response = new ApplyArchiveRuleResponse(); 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("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ApplyArchiveRuleResponseUnmarshaller _instance = new ApplyArchiveRuleResponseUnmarshaller(); internal static ApplyArchiveRuleResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ApplyArchiveRuleResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ArchiveRuleSummary Object /// </summary> public class ArchiveRuleSummaryUnmarshaller : IUnmarshaller<ArchiveRuleSummary, XmlUnmarshallerContext>, IUnmarshaller<ArchiveRuleSummary, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ArchiveRuleSummary IUnmarshaller<ArchiveRuleSummary, 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 ArchiveRuleSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ArchiveRuleSummary unmarshalledObject = new ArchiveRuleSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("filter", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, Criterion, StringUnmarshaller, CriterionUnmarshaller>(StringUnmarshaller.Instance, CriterionUnmarshaller.Instance); unmarshalledObject.Filter = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ruleName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RuleName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("updatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.UpdatedAt = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ArchiveRuleSummaryUnmarshaller _instance = new ArchiveRuleSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ArchiveRuleSummaryUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// CancelPolicyGeneration Request Marshaller /// </summary> public class CancelPolicyGenerationRequestMarshaller : IMarshaller<IRequest, CancelPolicyGenerationRequest> , 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((CancelPolicyGenerationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CancelPolicyGenerationRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "PUT"; if (!publicRequest.IsSetJobId()) throw new AmazonAccessAnalyzerException("Request object does not have required field JobId set"); request.AddPathResource("{jobId}", StringUtils.FromString(publicRequest.JobId)); request.ResourcePath = "/policy/generation/{jobId}"; return request; } private static CancelPolicyGenerationRequestMarshaller _instance = new CancelPolicyGenerationRequestMarshaller(); internal static CancelPolicyGenerationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CancelPolicyGenerationRequestMarshaller Instance { get { return _instance; } } } }
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CancelPolicyGeneration operation /// </summary> public class CancelPolicyGenerationResponseUnmarshaller : 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) { CancelPolicyGenerationResponse response = new CancelPolicyGenerationResponse(); 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("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CancelPolicyGenerationResponseUnmarshaller _instance = new CancelPolicyGenerationResponseUnmarshaller(); internal static CancelPolicyGenerationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CancelPolicyGenerationResponseUnmarshaller Instance { get { return _instance; } } } }
111
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// CloudTrailDetails Marshaller /// </summary> public class CloudTrailDetailsMarshaller : IRequestMarshaller<CloudTrailDetails, 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(CloudTrailDetails requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAccessRole()) { context.Writer.WritePropertyName("accessRole"); context.Writer.Write(requestObject.AccessRole); } if(requestObject.IsSetEndTime()) { context.Writer.WritePropertyName("endTime"); context.Writer.Write(StringUtils.FromDateTimeToISO8601(requestObject.EndTime)); } if(requestObject.IsSetStartTime()) { context.Writer.WritePropertyName("startTime"); context.Writer.Write(StringUtils.FromDateTimeToISO8601(requestObject.StartTime)); } if(requestObject.IsSetTrails()) { context.Writer.WritePropertyName("trails"); context.Writer.WriteArrayStart(); foreach(var requestObjectTrailsListValue in requestObject.Trails) { context.Writer.WriteObjectStart(); var marshaller = TrailMarshaller.Instance; marshaller.Marshall(requestObjectTrailsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CloudTrailDetailsMarshaller Instance = new CloudTrailDetailsMarshaller(); } }
90
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CloudTrailProperties Object /// </summary> public class CloudTrailPropertiesUnmarshaller : IUnmarshaller<CloudTrailProperties, XmlUnmarshallerContext>, IUnmarshaller<CloudTrailProperties, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> CloudTrailProperties IUnmarshaller<CloudTrailProperties, 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 CloudTrailProperties Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; CloudTrailProperties unmarshalledObject = new CloudTrailProperties(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("endTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.EndTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("startTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.StartTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("trailProperties", targetDepth)) { var unmarshaller = new ListUnmarshaller<TrailProperties, TrailPropertiesUnmarshaller>(TrailPropertiesUnmarshaller.Instance); unmarshalledObject.TrailProperties = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static CloudTrailPropertiesUnmarshaller _instance = new CloudTrailPropertiesUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static CloudTrailPropertiesUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Configuration Marshaller /// </summary> public class ConfigurationMarshaller : IRequestMarshaller<Configuration, 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(Configuration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetEbsSnapshot()) { context.Writer.WritePropertyName("ebsSnapshot"); context.Writer.WriteObjectStart(); var marshaller = EbsSnapshotConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.EbsSnapshot, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetEcrRepository()) { context.Writer.WritePropertyName("ecrRepository"); context.Writer.WriteObjectStart(); var marshaller = EcrRepositoryConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.EcrRepository, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetEfsFileSystem()) { context.Writer.WritePropertyName("efsFileSystem"); context.Writer.WriteObjectStart(); var marshaller = EfsFileSystemConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.EfsFileSystem, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetIamRole()) { context.Writer.WritePropertyName("iamRole"); context.Writer.WriteObjectStart(); var marshaller = IamRoleConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.IamRole, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetKmsKey()) { context.Writer.WritePropertyName("kmsKey"); context.Writer.WriteObjectStart(); var marshaller = KmsKeyConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.KmsKey, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetRdsDbClusterSnapshot()) { context.Writer.WritePropertyName("rdsDbClusterSnapshot"); context.Writer.WriteObjectStart(); var marshaller = RdsDbClusterSnapshotConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.RdsDbClusterSnapshot, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetRdsDbSnapshot()) { context.Writer.WritePropertyName("rdsDbSnapshot"); context.Writer.WriteObjectStart(); var marshaller = RdsDbSnapshotConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.RdsDbSnapshot, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetS3Bucket()) { context.Writer.WritePropertyName("s3Bucket"); context.Writer.WriteObjectStart(); var marshaller = S3BucketConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.S3Bucket, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetSecretsManagerSecret()) { context.Writer.WritePropertyName("secretsManagerSecret"); context.Writer.WriteObjectStart(); var marshaller = SecretsManagerSecretConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.SecretsManagerSecret, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetSnsTopic()) { context.Writer.WritePropertyName("snsTopic"); context.Writer.WriteObjectStart(); var marshaller = SnsTopicConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.SnsTopic, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetSqsQueue()) { context.Writer.WritePropertyName("sqsQueue"); context.Writer.WriteObjectStart(); var marshaller = SqsQueueConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.SqsQueue, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ConfigurationMarshaller Instance = new ConfigurationMarshaller(); } }
177
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Configuration Object /// </summary> public class ConfigurationUnmarshaller : IUnmarshaller<Configuration, XmlUnmarshallerContext>, IUnmarshaller<Configuration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Configuration IUnmarshaller<Configuration, 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 Configuration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Configuration unmarshalledObject = new Configuration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ebsSnapshot", targetDepth)) { var unmarshaller = EbsSnapshotConfigurationUnmarshaller.Instance; unmarshalledObject.EbsSnapshot = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ecrRepository", targetDepth)) { var unmarshaller = EcrRepositoryConfigurationUnmarshaller.Instance; unmarshalledObject.EcrRepository = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("efsFileSystem", targetDepth)) { var unmarshaller = EfsFileSystemConfigurationUnmarshaller.Instance; unmarshalledObject.EfsFileSystem = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("iamRole", targetDepth)) { var unmarshaller = IamRoleConfigurationUnmarshaller.Instance; unmarshalledObject.IamRole = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("kmsKey", targetDepth)) { var unmarshaller = KmsKeyConfigurationUnmarshaller.Instance; unmarshalledObject.KmsKey = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("rdsDbClusterSnapshot", targetDepth)) { var unmarshaller = RdsDbClusterSnapshotConfigurationUnmarshaller.Instance; unmarshalledObject.RdsDbClusterSnapshot = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("rdsDbSnapshot", targetDepth)) { var unmarshaller = RdsDbSnapshotConfigurationUnmarshaller.Instance; unmarshalledObject.RdsDbSnapshot = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("s3Bucket", targetDepth)) { var unmarshaller = S3BucketConfigurationUnmarshaller.Instance; unmarshalledObject.S3Bucket = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("secretsManagerSecret", targetDepth)) { var unmarshaller = SecretsManagerSecretConfigurationUnmarshaller.Instance; unmarshalledObject.SecretsManagerSecret = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("snsTopic", targetDepth)) { var unmarshaller = SnsTopicConfigurationUnmarshaller.Instance; unmarshalledObject.SnsTopic = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("sqsQueue", targetDepth)) { var unmarshaller = SqsQueueConfigurationUnmarshaller.Instance; unmarshalledObject.SqsQueue = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ConfigurationUnmarshaller _instance = new ConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ConflictException Object /// </summary> public class ConflictExceptionUnmarshaller : IErrorResponseUnmarshaller<ConflictException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ConflictException 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 ConflictException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ConflictException unmarshalledObject = new ConflictException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("resourceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceType = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ConflictExceptionUnmarshaller _instance = new ConflictExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ConflictExceptionUnmarshaller Instance { get { return _instance; } } } }
97
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// CreateAccessPreview Request Marshaller /// </summary> public class CreateAccessPreviewRequestMarshaller : IMarshaller<IRequest, CreateAccessPreviewRequest> , 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((CreateAccessPreviewRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateAccessPreviewRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "PUT"; request.ResourcePath = "/access-preview"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAnalyzerArn()) { context.Writer.WritePropertyName("analyzerArn"); context.Writer.Write(publicRequest.AnalyzerArn); } if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetConfigurations()) { context.Writer.WritePropertyName("configurations"); context.Writer.WriteObjectStart(); foreach (var publicRequestConfigurationsKvp in publicRequest.Configurations) { context.Writer.WritePropertyName(publicRequestConfigurationsKvp.Key); var publicRequestConfigurationsValue = publicRequestConfigurationsKvp.Value; context.Writer.WriteObjectStart(); var marshaller = ConfigurationMarshaller.Instance; marshaller.Marshall(publicRequestConfigurationsValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateAccessPreviewRequestMarshaller _instance = new CreateAccessPreviewRequestMarshaller(); internal static CreateAccessPreviewRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAccessPreviewRequestMarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateAccessPreview operation /// </summary> public class CreateAccessPreviewResponseUnmarshaller : 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) { CreateAccessPreviewResponse response = new CreateAccessPreviewResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = 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("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceQuotaExceededException")) { return ServiceQuotaExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateAccessPreviewResponseUnmarshaller _instance = new CreateAccessPreviewResponseUnmarshaller(); internal static CreateAccessPreviewResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAccessPreviewResponseUnmarshaller Instance { get { return _instance; } } } }
134
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// CreateAnalyzer Request Marshaller /// </summary> public class CreateAnalyzerRequestMarshaller : IMarshaller<IRequest, CreateAnalyzerRequest> , 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((CreateAnalyzerRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateAnalyzerRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "PUT"; request.ResourcePath = "/analyzer"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAnalyzerName()) { context.Writer.WritePropertyName("analyzerName"); context.Writer.Write(publicRequest.AnalyzerName); } if(publicRequest.IsSetArchiveRules()) { context.Writer.WritePropertyName("archiveRules"); context.Writer.WriteArrayStart(); foreach(var publicRequestArchiveRulesListValue in publicRequest.ArchiveRules) { context.Writer.WriteObjectStart(); var marshaller = InlineArchiveRuleMarshaller.Instance; marshaller.Marshall(publicRequestArchiveRulesListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("tags"); context.Writer.WriteObjectStart(); foreach (var publicRequestTagsKvp in publicRequest.Tags) { context.Writer.WritePropertyName(publicRequestTagsKvp.Key); var publicRequestTagsValue = publicRequestTagsKvp.Value; context.Writer.Write(publicRequestTagsValue); } context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetType()) { context.Writer.WritePropertyName("type"); context.Writer.Write(publicRequest.Type); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateAnalyzerRequestMarshaller _instance = new CreateAnalyzerRequestMarshaller(); internal static CreateAnalyzerRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAnalyzerRequestMarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateAnalyzer operation /// </summary> public class CreateAnalyzerResponseUnmarshaller : 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) { CreateAnalyzerResponse response = new CreateAnalyzerResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Arn = 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("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceQuotaExceededException")) { return ServiceQuotaExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateAnalyzerResponseUnmarshaller _instance = new CreateAnalyzerResponseUnmarshaller(); internal static CreateAnalyzerResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAnalyzerResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// CreateArchiveRule Request Marshaller /// </summary> public class CreateArchiveRuleRequestMarshaller : IMarshaller<IRequest, CreateArchiveRuleRequest> , 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((CreateArchiveRuleRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateArchiveRuleRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "PUT"; if (!publicRequest.IsSetAnalyzerName()) throw new AmazonAccessAnalyzerException("Request object does not have required field AnalyzerName set"); request.AddPathResource("{analyzerName}", StringUtils.FromString(publicRequest.AnalyzerName)); request.ResourcePath = "/analyzer/{analyzerName}/archive-rule"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetFilter()) { context.Writer.WritePropertyName("filter"); context.Writer.WriteObjectStart(); foreach (var publicRequestFilterKvp in publicRequest.Filter) { context.Writer.WritePropertyName(publicRequestFilterKvp.Key); var publicRequestFilterValue = publicRequestFilterKvp.Value; context.Writer.WriteObjectStart(); var marshaller = CriterionMarshaller.Instance; marshaller.Marshall(publicRequestFilterValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetRuleName()) { context.Writer.WritePropertyName("ruleName"); context.Writer.Write(publicRequest.RuleName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateArchiveRuleRequestMarshaller _instance = new CreateArchiveRuleRequestMarshaller(); internal static CreateArchiveRuleRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateArchiveRuleRequestMarshaller Instance { get { return _instance; } } } }
134
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateArchiveRule operation /// </summary> public class CreateArchiveRuleResponseUnmarshaller : 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) { CreateArchiveRuleResponse response = new CreateArchiveRuleResponse(); 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("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceQuotaExceededException")) { return ServiceQuotaExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateArchiveRuleResponseUnmarshaller _instance = new CreateArchiveRuleResponseUnmarshaller(); internal static CreateArchiveRuleResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateArchiveRuleResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Criterion Marshaller /// </summary> public class CriterionMarshaller : IRequestMarshaller<Criterion, 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(Criterion requestObject, JsonMarshallerContext context) { if(requestObject.IsSetContains()) { context.Writer.WritePropertyName("contains"); context.Writer.WriteArrayStart(); foreach(var requestObjectContainsListValue in requestObject.Contains) { context.Writer.Write(requestObjectContainsListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetEq()) { context.Writer.WritePropertyName("eq"); context.Writer.WriteArrayStart(); foreach(var requestObjectEqListValue in requestObject.Eq) { context.Writer.Write(requestObjectEqListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetExists()) { context.Writer.WritePropertyName("exists"); context.Writer.Write(requestObject.Exists); } if(requestObject.IsSetNeq()) { context.Writer.WritePropertyName("neq"); context.Writer.WriteArrayStart(); foreach(var requestObjectNeqListValue in requestObject.Neq) { context.Writer.Write(requestObjectNeqListValue); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CriterionMarshaller Instance = new CriterionMarshaller(); } }
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Criterion Object /// </summary> public class CriterionUnmarshaller : IUnmarshaller<Criterion, XmlUnmarshallerContext>, IUnmarshaller<Criterion, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Criterion IUnmarshaller<Criterion, 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 Criterion Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Criterion unmarshalledObject = new Criterion(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("contains", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.Contains = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("eq", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.Eq = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("exists", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Exists = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("neq", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.Neq = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static CriterionUnmarshaller _instance = new CriterionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static CriterionUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// DeleteAnalyzer Request Marshaller /// </summary> public class DeleteAnalyzerRequestMarshaller : IMarshaller<IRequest, DeleteAnalyzerRequest> , 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((DeleteAnalyzerRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteAnalyzerRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetAnalyzerName()) throw new AmazonAccessAnalyzerException("Request object does not have required field AnalyzerName set"); request.AddPathResource("{analyzerName}", StringUtils.FromString(publicRequest.AnalyzerName)); if (publicRequest.IsSetClientToken()) request.Parameters.Add("clientToken", StringUtils.FromString(publicRequest.ClientToken)); else request.Parameters.Add("clientToken", System.Guid.NewGuid().ToString()); request.ResourcePath = "/analyzer/{analyzerName}"; request.UseQueryString = true; return request; } private static DeleteAnalyzerRequestMarshaller _instance = new DeleteAnalyzerRequestMarshaller(); internal static DeleteAnalyzerRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteAnalyzerRequestMarshaller Instance { get { return _instance; } } } }
94
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteAnalyzer operation /// </summary> public class DeleteAnalyzerResponseUnmarshaller : 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) { DeleteAnalyzerResponse response = new DeleteAnalyzerResponse(); 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("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteAnalyzerResponseUnmarshaller _instance = new DeleteAnalyzerResponseUnmarshaller(); internal static DeleteAnalyzerResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteAnalyzerResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// DeleteArchiveRule Request Marshaller /// </summary> public class DeleteArchiveRuleRequestMarshaller : IMarshaller<IRequest, DeleteArchiveRuleRequest> , 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((DeleteArchiveRuleRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteArchiveRuleRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetAnalyzerName()) throw new AmazonAccessAnalyzerException("Request object does not have required field AnalyzerName set"); request.AddPathResource("{analyzerName}", StringUtils.FromString(publicRequest.AnalyzerName)); if (!publicRequest.IsSetRuleName()) throw new AmazonAccessAnalyzerException("Request object does not have required field RuleName set"); request.AddPathResource("{ruleName}", StringUtils.FromString(publicRequest.RuleName)); if (publicRequest.IsSetClientToken()) request.Parameters.Add("clientToken", StringUtils.FromString(publicRequest.ClientToken)); else request.Parameters.Add("clientToken", System.Guid.NewGuid().ToString()); request.ResourcePath = "/analyzer/{analyzerName}/archive-rule/{ruleName}"; request.UseQueryString = true; return request; } private static DeleteArchiveRuleRequestMarshaller _instance = new DeleteArchiveRuleRequestMarshaller(); internal static DeleteArchiveRuleRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteArchiveRuleRequestMarshaller Instance { get { return _instance; } } } }
97
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteArchiveRule operation /// </summary> public class DeleteArchiveRuleResponseUnmarshaller : 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) { DeleteArchiveRuleResponse response = new DeleteArchiveRuleResponse(); 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("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteArchiveRuleResponseUnmarshaller _instance = new DeleteArchiveRuleResponseUnmarshaller(); internal static DeleteArchiveRuleResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteArchiveRuleResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// EbsSnapshotConfiguration Marshaller /// </summary> public class EbsSnapshotConfigurationMarshaller : IRequestMarshaller<EbsSnapshotConfiguration, 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(EbsSnapshotConfiguration 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.IsSetKmsKeyId()) { context.Writer.WritePropertyName("kmsKeyId"); context.Writer.Write(requestObject.KmsKeyId); } if(requestObject.IsSetUserIds()) { context.Writer.WritePropertyName("userIds"); context.Writer.WriteArrayStart(); foreach(var requestObjectUserIdsListValue in requestObject.UserIds) { context.Writer.Write(requestObjectUserIdsListValue); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static EbsSnapshotConfigurationMarshaller Instance = new EbsSnapshotConfigurationMarshaller(); } }
84
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for EbsSnapshotConfiguration Object /// </summary> public class EbsSnapshotConfigurationUnmarshaller : IUnmarshaller<EbsSnapshotConfiguration, XmlUnmarshallerContext>, IUnmarshaller<EbsSnapshotConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> EbsSnapshotConfiguration IUnmarshaller<EbsSnapshotConfiguration, 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 EbsSnapshotConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; EbsSnapshotConfiguration unmarshalledObject = new EbsSnapshotConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("groups", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.Groups = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("kmsKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsKeyId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("userIds", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.UserIds = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static EbsSnapshotConfigurationUnmarshaller _instance = new EbsSnapshotConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static EbsSnapshotConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// EcrRepositoryConfiguration Marshaller /// </summary> public class EcrRepositoryConfigurationMarshaller : IRequestMarshaller<EcrRepositoryConfiguration, 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(EcrRepositoryConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetRepositoryPolicy()) { context.Writer.WritePropertyName("repositoryPolicy"); context.Writer.Write(requestObject.RepositoryPolicy); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static EcrRepositoryConfigurationMarshaller Instance = new EcrRepositoryConfigurationMarshaller(); } }
62
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for EcrRepositoryConfiguration Object /// </summary> public class EcrRepositoryConfigurationUnmarshaller : IUnmarshaller<EcrRepositoryConfiguration, XmlUnmarshallerContext>, IUnmarshaller<EcrRepositoryConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> EcrRepositoryConfiguration IUnmarshaller<EcrRepositoryConfiguration, 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 EcrRepositoryConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; EcrRepositoryConfiguration unmarshalledObject = new EcrRepositoryConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("repositoryPolicy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RepositoryPolicy = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static EcrRepositoryConfigurationUnmarshaller _instance = new EcrRepositoryConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static EcrRepositoryConfigurationUnmarshaller Instance { get { return _instance; } } } }
92
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// EfsFileSystemConfiguration Marshaller /// </summary> public class EfsFileSystemConfigurationMarshaller : IRequestMarshaller<EfsFileSystemConfiguration, 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(EfsFileSystemConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetFileSystemPolicy()) { context.Writer.WritePropertyName("fileSystemPolicy"); context.Writer.Write(requestObject.FileSystemPolicy); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static EfsFileSystemConfigurationMarshaller Instance = new EfsFileSystemConfigurationMarshaller(); } }
62
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for EfsFileSystemConfiguration Object /// </summary> public class EfsFileSystemConfigurationUnmarshaller : IUnmarshaller<EfsFileSystemConfiguration, XmlUnmarshallerContext>, IUnmarshaller<EfsFileSystemConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> EfsFileSystemConfiguration IUnmarshaller<EfsFileSystemConfiguration, 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 EfsFileSystemConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; EfsFileSystemConfiguration unmarshalledObject = new EfsFileSystemConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("fileSystemPolicy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FileSystemPolicy = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static EfsFileSystemConfigurationUnmarshaller _instance = new EfsFileSystemConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static EfsFileSystemConfigurationUnmarshaller Instance { get { return _instance; } } } }
92
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FindingSourceDetail Object /// </summary> public class FindingSourceDetailUnmarshaller : IUnmarshaller<FindingSourceDetail, XmlUnmarshallerContext>, IUnmarshaller<FindingSourceDetail, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> FindingSourceDetail IUnmarshaller<FindingSourceDetail, 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 FindingSourceDetail Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; FindingSourceDetail unmarshalledObject = new FindingSourceDetail(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("accessPointAccount", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AccessPointAccount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("accessPointArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AccessPointArn = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static FindingSourceDetailUnmarshaller _instance = new FindingSourceDetailUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FindingSourceDetailUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FindingSource Object /// </summary> public class FindingSourceUnmarshaller : IUnmarshaller<FindingSource, XmlUnmarshallerContext>, IUnmarshaller<FindingSource, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> FindingSource IUnmarshaller<FindingSource, 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 FindingSource Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; FindingSource unmarshalledObject = new FindingSource(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("detail", targetDepth)) { var unmarshaller = FindingSourceDetailUnmarshaller.Instance; unmarshalledObject.Detail = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static FindingSourceUnmarshaller _instance = new FindingSourceUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FindingSourceUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FindingSummary Object /// </summary> public class FindingSummaryUnmarshaller : IUnmarshaller<FindingSummary, XmlUnmarshallerContext>, IUnmarshaller<FindingSummary, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> FindingSummary IUnmarshaller<FindingSummary, 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 FindingSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; FindingSummary unmarshalledObject = new FindingSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("action", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.Action = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("analyzedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.AnalyzedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("condition", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Condition = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("error", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Error = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("isPublic", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsPublic = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("principal", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Principal = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resource", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Resource = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceOwnerAccount", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceOwnerAccount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("sources", targetDepth)) { var unmarshaller = new ListUnmarshaller<FindingSource, FindingSourceUnmarshaller>(FindingSourceUnmarshaller.Instance); unmarshalledObject.Sources = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("updatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.UpdatedAt = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static FindingSummaryUnmarshaller _instance = new FindingSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FindingSummaryUnmarshaller Instance { get { return _instance; } } } }
170
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Finding Object /// </summary> public class FindingUnmarshaller : IUnmarshaller<Finding, XmlUnmarshallerContext>, IUnmarshaller<Finding, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Finding IUnmarshaller<Finding, 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 Finding Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Finding unmarshalledObject = new Finding(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("action", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.Action = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("analyzedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.AnalyzedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("condition", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Condition = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("error", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Error = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("isPublic", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsPublic = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("principal", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Principal = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resource", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Resource = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceOwnerAccount", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceOwnerAccount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("sources", targetDepth)) { var unmarshaller = new ListUnmarshaller<FindingSource, FindingSourceUnmarshaller>(FindingSourceUnmarshaller.Instance); unmarshalledObject.Sources = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("updatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.UpdatedAt = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static FindingUnmarshaller _instance = new FindingUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FindingUnmarshaller Instance { get { return _instance; } } } }
170
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GeneratedPolicyProperties Object /// </summary> public class GeneratedPolicyPropertiesUnmarshaller : IUnmarshaller<GeneratedPolicyProperties, XmlUnmarshallerContext>, IUnmarshaller<GeneratedPolicyProperties, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GeneratedPolicyProperties IUnmarshaller<GeneratedPolicyProperties, 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 GeneratedPolicyProperties Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GeneratedPolicyProperties unmarshalledObject = new GeneratedPolicyProperties(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("cloudTrailProperties", targetDepth)) { var unmarshaller = CloudTrailPropertiesUnmarshaller.Instance; unmarshalledObject.CloudTrailProperties = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("isComplete", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsComplete = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("principalArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PrincipalArn = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GeneratedPolicyPropertiesUnmarshaller _instance = new GeneratedPolicyPropertiesUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GeneratedPolicyPropertiesUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GeneratedPolicyResult Object /// </summary> public class GeneratedPolicyResultUnmarshaller : IUnmarshaller<GeneratedPolicyResult, XmlUnmarshallerContext>, IUnmarshaller<GeneratedPolicyResult, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GeneratedPolicyResult IUnmarshaller<GeneratedPolicyResult, 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 GeneratedPolicyResult Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GeneratedPolicyResult unmarshalledObject = new GeneratedPolicyResult(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("generatedPolicies", targetDepth)) { var unmarshaller = new ListUnmarshaller<GeneratedPolicy, GeneratedPolicyUnmarshaller>(GeneratedPolicyUnmarshaller.Instance); unmarshalledObject.GeneratedPolicies = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("properties", targetDepth)) { var unmarshaller = GeneratedPolicyPropertiesUnmarshaller.Instance; unmarshalledObject.Properties = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GeneratedPolicyResultUnmarshaller _instance = new GeneratedPolicyResultUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GeneratedPolicyResultUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GeneratedPolicy Object /// </summary> public class GeneratedPolicyUnmarshaller : IUnmarshaller<GeneratedPolicy, XmlUnmarshallerContext>, IUnmarshaller<GeneratedPolicy, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GeneratedPolicy IUnmarshaller<GeneratedPolicy, 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 GeneratedPolicy Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GeneratedPolicy unmarshalledObject = new GeneratedPolicy(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("policy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Policy = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GeneratedPolicyUnmarshaller _instance = new GeneratedPolicyUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GeneratedPolicyUnmarshaller Instance { get { return _instance; } } } }
92
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// GetAccessPreview Request Marshaller /// </summary> public class GetAccessPreviewRequestMarshaller : IMarshaller<IRequest, GetAccessPreviewRequest> , 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((GetAccessPreviewRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetAccessPreviewRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "GET"; if (!publicRequest.IsSetAccessPreviewId()) throw new AmazonAccessAnalyzerException("Request object does not have required field AccessPreviewId set"); request.AddPathResource("{accessPreviewId}", StringUtils.FromString(publicRequest.AccessPreviewId)); if (publicRequest.IsSetAnalyzerArn()) request.Parameters.Add("analyzerArn", StringUtils.FromString(publicRequest.AnalyzerArn)); request.ResourcePath = "/access-preview/{accessPreviewId}"; request.UseQueryString = true; return request; } private static GetAccessPreviewRequestMarshaller _instance = new GetAccessPreviewRequestMarshaller(); internal static GetAccessPreviewRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetAccessPreviewRequestMarshaller Instance { get { return _instance; } } } }
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetAccessPreview operation /// </summary> public class GetAccessPreviewResponseUnmarshaller : 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) { GetAccessPreviewResponse response = new GetAccessPreviewResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("accessPreview", targetDepth)) { var unmarshaller = AccessPreviewUnmarshaller.Instance; response.AccessPreview = 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("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetAccessPreviewResponseUnmarshaller _instance = new GetAccessPreviewResponseUnmarshaller(); internal static GetAccessPreviewResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetAccessPreviewResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// GetAnalyzedResource Request Marshaller /// </summary> public class GetAnalyzedResourceRequestMarshaller : IMarshaller<IRequest, GetAnalyzedResourceRequest> , 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((GetAnalyzedResourceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetAnalyzedResourceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "GET"; if (publicRequest.IsSetAnalyzerArn()) request.Parameters.Add("analyzerArn", StringUtils.FromString(publicRequest.AnalyzerArn)); if (publicRequest.IsSetResourceArn()) request.Parameters.Add("resourceArn", StringUtils.FromString(publicRequest.ResourceArn)); request.ResourcePath = "/analyzed-resource"; request.UseQueryString = true; return request; } private static GetAnalyzedResourceRequestMarshaller _instance = new GetAnalyzedResourceRequestMarshaller(); internal static GetAnalyzedResourceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetAnalyzedResourceRequestMarshaller Instance { get { return _instance; } } } }
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetAnalyzedResource operation /// </summary> public class GetAnalyzedResourceResponseUnmarshaller : 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) { GetAnalyzedResourceResponse response = new GetAnalyzedResourceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("resource", targetDepth)) { var unmarshaller = AnalyzedResourceUnmarshaller.Instance; response.Resource = 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("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetAnalyzedResourceResponseUnmarshaller _instance = new GetAnalyzedResourceResponseUnmarshaller(); internal static GetAnalyzedResourceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetAnalyzedResourceResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// GetAnalyzer Request Marshaller /// </summary> public class GetAnalyzerRequestMarshaller : IMarshaller<IRequest, GetAnalyzerRequest> , 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((GetAnalyzerRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetAnalyzerRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "GET"; if (!publicRequest.IsSetAnalyzerName()) throw new AmazonAccessAnalyzerException("Request object does not have required field AnalyzerName set"); request.AddPathResource("{analyzerName}", StringUtils.FromString(publicRequest.AnalyzerName)); request.ResourcePath = "/analyzer/{analyzerName}"; return request; } private static GetAnalyzerRequestMarshaller _instance = new GetAnalyzerRequestMarshaller(); internal static GetAnalyzerRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetAnalyzerRequestMarshaller Instance { get { return _instance; } } } }
87
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetAnalyzer operation /// </summary> public class GetAnalyzerResponseUnmarshaller : 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) { GetAnalyzerResponse response = new GetAnalyzerResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("analyzer", targetDepth)) { var unmarshaller = AnalyzerSummaryUnmarshaller.Instance; response.Analyzer = 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("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetAnalyzerResponseUnmarshaller _instance = new GetAnalyzerResponseUnmarshaller(); internal static GetAnalyzerResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetAnalyzerResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// GetArchiveRule Request Marshaller /// </summary> public class GetArchiveRuleRequestMarshaller : IMarshaller<IRequest, GetArchiveRuleRequest> , 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((GetArchiveRuleRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetArchiveRuleRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "GET"; if (!publicRequest.IsSetAnalyzerName()) throw new AmazonAccessAnalyzerException("Request object does not have required field AnalyzerName set"); request.AddPathResource("{analyzerName}", StringUtils.FromString(publicRequest.AnalyzerName)); if (!publicRequest.IsSetRuleName()) throw new AmazonAccessAnalyzerException("Request object does not have required field RuleName set"); request.AddPathResource("{ruleName}", StringUtils.FromString(publicRequest.RuleName)); request.ResourcePath = "/analyzer/{analyzerName}/archive-rule/{ruleName}"; return request; } private static GetArchiveRuleRequestMarshaller _instance = new GetArchiveRuleRequestMarshaller(); internal static GetArchiveRuleRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetArchiveRuleRequestMarshaller Instance { get { return _instance; } } } }
90