1
+ /*
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License").
5
+ * You may not use this file except in compliance with the License.
6
+ * A copy of the License is located at
7
+ *
8
+ * http://aws.amazon.com/apache2.0
9
+ *
10
+ * or in the "license" file accompanying this file. This file is distributed
11
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+ * express or implied. See the License for the specific language governing
13
+ * permissions and limitations under the License.
14
+ */
15
+ using System ;
16
+ using System . Collections . Generic ;
17
+ using System . Xml . Serialization ;
18
+ using System . Text ;
19
+ using System . IO ;
20
+ using System . Net ;
21
+
22
+ using Amazon . Runtime ;
23
+ using Amazon . Runtime . Internal ;
24
+
25
+ namespace Amazon . S3 . Model
26
+ {
27
+ /// <summary>
28
+ /// The request includes a client token value that was used for a previous request, but at least one of the request parameters is different from
29
+ /// the previous request that used that client token.
30
+ /// </summary>
31
+ /// <remarks>
32
+ /// This exception is specific to operations that use idempotency tokens, such as the RenameObject operation.
33
+ /// When you receive this exception, it means you're attempting to retry an operation with the same client token but with different parameters,
34
+ /// which violates the idempotency guarantee.
35
+ /// </remarks>
36
+ #if ! NETSTANDARD
37
+ [ Serializable ]
38
+ #endif
39
+ public partial class IdempotencyParameterMismatchException : AmazonS3Exception
40
+ {
41
+ /// <summary>
42
+ /// Constructs a new IdempotencyParameterMismatchException with the specified error
43
+ /// message.
44
+ /// </summary>
45
+ /// <param name="message">
46
+ /// Describes the error encountered.
47
+ /// </param>
48
+ public IdempotencyParameterMismatchException ( string message )
49
+ : base ( message ) { }
50
+
51
+ /// <summary>
52
+ /// Construct instance of IdempotencyParameterMismatchException
53
+ /// </summary>
54
+ /// <param name="message"></param>
55
+ /// <param name="innerException"></param>
56
+ public IdempotencyParameterMismatchException ( string message , Exception innerException )
57
+ : base ( message , innerException ) { }
58
+
59
+ /// <summary>
60
+ /// Construct instance of IdempotencyParameterMismatchException
61
+ /// </summary>
62
+ /// <param name="innerException"></param>
63
+ public IdempotencyParameterMismatchException ( Exception innerException )
64
+ : base ( innerException ) { }
65
+
66
+ /// <summary>
67
+ /// Construct instance of IdempotencyParameterMismatchException
68
+ /// </summary>
69
+ /// <param name="message"></param>
70
+ /// <param name="innerException"></param>
71
+ /// <param name="errorType"></param>
72
+ /// <param name="errorCode"></param>
73
+ /// <param name="requestId"></param>
74
+ /// <param name="statusCode"></param>
75
+ public IdempotencyParameterMismatchException ( string message , Exception innerException , ErrorType errorType , string errorCode , string requestId , HttpStatusCode statusCode )
76
+ : base ( message , innerException , errorType , errorCode , requestId , statusCode ) { }
77
+
78
+ /// <summary>
79
+ /// Construct instance of IdempotencyParameterMismatchException
80
+ /// </summary>
81
+ /// <param name="message"></param>
82
+ /// <param name="errorType"></param>
83
+ /// <param name="errorCode"></param>
84
+ /// <param name="requestId"></param>
85
+ /// <param name="statusCode"></param>
86
+ public IdempotencyParameterMismatchException ( string message , ErrorType errorType , string errorCode , string requestId , HttpStatusCode statusCode )
87
+ : base ( message , errorType , errorCode , requestId , statusCode ) { }
88
+
89
+ /// <summary>
90
+ /// Construct instance of IdempotencyParameterMismatchException
91
+ /// </summary>
92
+ /// <param name="message"></param>
93
+ /// <param name="innerException"></param>
94
+ /// <param name="errorType"></param>
95
+ /// <param name="errorCode"></param>
96
+ /// <param name="requestId"></param>
97
+ /// <param name="statusCode"></param>
98
+ /// <param name="amazonId2"></param>
99
+ /// <param name="amazonCfId"></param>
100
+ public IdempotencyParameterMismatchException ( string message , Exception innerException , ErrorType errorType , string errorCode , string requestId , HttpStatusCode statusCode , string amazonId2 , string amazonCfId )
101
+ : base ( message , innerException , errorType , errorCode , requestId , statusCode , amazonId2 , amazonCfId ) { }
102
+
103
+ #if ! NETSTANDARD
104
+ /// <summary>
105
+ /// Constructs a new instance of the IdempotencyParameterMismatchException class with serialized data.
106
+ /// </summary>
107
+ /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
108
+ /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
109
+ /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
110
+ /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
111
+ protected IdempotencyParameterMismatchException ( System . Runtime . Serialization . SerializationInfo info , System . Runtime . Serialization . StreamingContext context )
112
+ : base ( info , context )
113
+ {
114
+ }
115
+
116
+ /// <summary>
117
+ /// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
118
+ /// </summary>
119
+ /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
120
+ /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
121
+ /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
122
+ #if BCL35
123
+ [ System . Security . Permissions . SecurityPermission (
124
+ System . Security . Permissions . SecurityAction . LinkDemand ,
125
+ Flags = System . Security . Permissions . SecurityPermissionFlag . SerializationFormatter ) ]
126
+ #endif
127
+ [ System . Security . SecurityCritical ]
128
+ // These FxCop rules are giving false-positives for this method
129
+ [ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Microsoft.Security" , "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase" ) ]
130
+ [ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Microsoft.Security" , "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule" ) ]
131
+ public override void GetObjectData ( System . Runtime . Serialization . SerializationInfo info , System . Runtime . Serialization . StreamingContext context )
132
+ {
133
+ base . GetObjectData ( info , context ) ;
134
+ }
135
+ #endif
136
+ }
137
+ }
0 commit comments