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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// The operation cannot proceed because you have insufficient permissions. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class AccessDeniedException : AmazonBackupGatewayException { private string _errorCode; /// <summary> /// Constructs a new AccessDeniedException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public AccessDeniedException(string message) : base(message) {} /// <summary> /// Construct instance of AccessDeniedException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public AccessDeniedException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of AccessDeniedException /// </summary> /// <param name="innerException"></param> public AccessDeniedException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of AccessDeniedException /// </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 AccessDeniedException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of AccessDeniedException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public AccessDeniedException(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 AccessDeniedException 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 AccessDeniedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.ErrorCode = (string)info.GetValue("ErrorCode", 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("ErrorCode", this.ErrorCode); } #endif /// <summary> /// Gets and sets the property ErrorCode. /// <para> /// A description of why you have insufficient permissions. /// </para> /// </summary> [AWSProperty(Required=true)] public string ErrorCode { get { return this._errorCode; } set { this._errorCode = value; } } // Check to see if ErrorCode property is set internal bool IsSetErrorCode() { return this._errorCode != null; } } }
146
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-01.normal.json service model. */ using Amazon.Runtime; namespace Amazon.BackupGateway { /// <summary> /// Base class for BackupGateway operation requests. /// </summary> public partial class AmazonBackupGatewayRequest : AmazonWebServiceRequest { } }
30
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the AssociateGatewayToServer operation. /// Associates a backup gateway with your server. After you complete the association process, /// you can back up and restore your VMs through the gateway. /// </summary> public partial class AssociateGatewayToServerRequest : AmazonBackupGatewayRequest { private string _gatewayArn; private string _serverArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation /// to return a list of gateways for your account and Amazon Web Services Region. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != null; } /// <summary> /// Gets and sets the property ServerArn. /// <para> /// The Amazon Resource Name (ARN) of the server that hosts your virtual machines. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string ServerArn { get { return this._serverArn; } set { this._serverArn = value; } } // Check to see if ServerArn property is set internal bool IsSetServerArn() { return this._serverArn != null; } } }
81
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the AssociateGatewayToServer operation. /// </summary> public partial class AssociateGatewayToServerResponse : AmazonWebServiceResponse { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of a gateway. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Describes a bandwidth rate limit interval for a gateway. A bandwidth rate limit schedule /// consists of one or more bandwidth rate limit intervals. A bandwidth rate limit interval /// defines a period of time on one or more days of the week, during which bandwidth rate /// limits are specified for uploading, downloading, or both. /// </summary> public partial class BandwidthRateLimitInterval { private long? _averageUploadRateLimitInBitsPerSec; private List<int> _daysOfWeek = new List<int>(); private int? _endHourOfDay; private int? _endMinuteOfHour; private int? _startHourOfDay; private int? _startMinuteOfHour; /// <summary> /// Gets and sets the property AverageUploadRateLimitInBitsPerSec. /// <para> /// The average upload rate limit component of the bandwidth rate limit interval, in bits /// per second. This field does not appear in the response if the upload rate limit is /// not set. /// </para> /// <note> /// <para> /// For Backup Gateway, the minimum value is <code>(Value)</code>. /// </para> /// </note> /// </summary> [AWSProperty(Min=51200, Max=8000000000000)] public long AverageUploadRateLimitInBitsPerSec { get { return this._averageUploadRateLimitInBitsPerSec.GetValueOrDefault(); } set { this._averageUploadRateLimitInBitsPerSec = value; } } // Check to see if AverageUploadRateLimitInBitsPerSec property is set internal bool IsSetAverageUploadRateLimitInBitsPerSec() { return this._averageUploadRateLimitInBitsPerSec.HasValue; } /// <summary> /// Gets and sets the property DaysOfWeek. /// <para> /// The days of the week component of the bandwidth rate limit interval, represented as /// ordinal numbers from 0 to 6, where 0 represents Sunday and 6 represents Saturday. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=7)] public List<int> DaysOfWeek { get { return this._daysOfWeek; } set { this._daysOfWeek = value; } } // Check to see if DaysOfWeek property is set internal bool IsSetDaysOfWeek() { return this._daysOfWeek != null && this._daysOfWeek.Count > 0; } /// <summary> /// Gets and sets the property EndHourOfDay. /// <para> /// The hour of the day to end the bandwidth rate limit interval. /// </para> /// </summary> [AWSProperty(Required=true, Min=0, Max=23)] public int EndHourOfDay { get { return this._endHourOfDay.GetValueOrDefault(); } set { this._endHourOfDay = value; } } // Check to see if EndHourOfDay property is set internal bool IsSetEndHourOfDay() { return this._endHourOfDay.HasValue; } /// <summary> /// Gets and sets the property EndMinuteOfHour. /// <para> /// The minute of the hour to end the bandwidth rate limit interval. /// </para> /// <important> /// <para> /// The bandwidth rate limit interval ends at the end of the minute. To end an interval /// at the end of an hour, use the value <code>59</code>. /// </para> /// </important> /// </summary> [AWSProperty(Required=true, Min=0, Max=59)] public int EndMinuteOfHour { get { return this._endMinuteOfHour.GetValueOrDefault(); } set { this._endMinuteOfHour = value; } } // Check to see if EndMinuteOfHour property is set internal bool IsSetEndMinuteOfHour() { return this._endMinuteOfHour.HasValue; } /// <summary> /// Gets and sets the property StartHourOfDay. /// <para> /// The hour of the day to start the bandwidth rate limit interval. /// </para> /// </summary> [AWSProperty(Required=true, Min=0, Max=23)] public int StartHourOfDay { get { return this._startHourOfDay.GetValueOrDefault(); } set { this._startHourOfDay = value; } } // Check to see if StartHourOfDay property is set internal bool IsSetStartHourOfDay() { return this._startHourOfDay.HasValue; } /// <summary> /// Gets and sets the property StartMinuteOfHour. /// <para> /// The minute of the hour to start the bandwidth rate limit interval. The interval begins /// at the start of that minute. To begin an interval exactly at the start of the hour, /// use the value <code>0</code>. /// </para> /// </summary> [AWSProperty(Required=true, Min=0, Max=59)] public int StartMinuteOfHour { get { return this._startMinuteOfHour.GetValueOrDefault(); } set { this._startMinuteOfHour = value; } } // Check to see if StartMinuteOfHour property is set internal bool IsSetStartMinuteOfHour() { return this._startMinuteOfHour.HasValue; } } }
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// The operation cannot proceed because it is not supported. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class ConflictException : AmazonBackupGatewayException { private string _errorCode; /// <summary> /// Constructs a new ConflictException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public ConflictException(string message) : base(message) {} /// <summary> /// Construct instance of ConflictException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public ConflictException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of ConflictException /// </summary> /// <param name="innerException"></param> public ConflictException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of ConflictException /// </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 ConflictException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of ConflictException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public ConflictException(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 ConflictException 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 ConflictException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.ErrorCode = (string)info.GetValue("ErrorCode", 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("ErrorCode", this.ErrorCode); } #endif /// <summary> /// Gets and sets the property ErrorCode. /// <para> /// A description of why the operation is not supported. /// </para> /// </summary> [AWSProperty(Required=true)] public string ErrorCode { get { return this._errorCode; } set { this._errorCode = value; } } // Check to see if ErrorCode property is set internal bool IsSetErrorCode() { return this._errorCode != null; } } }
146
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the CreateGateway operation. /// Creates a backup gateway. After you create a gateway, you can associate it with a /// server using the <code>AssociateGatewayToServer</code> operation. /// </summary> public partial class CreateGatewayRequest : AmazonBackupGatewayRequest { private string _activationKey; private string _gatewayDisplayName; private GatewayType _gatewayType; private List<Tag> _tags = new List<Tag>(); /// <summary> /// Gets and sets the property ActivationKey. /// <para> /// The activation key of the created gateway. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=50)] public string ActivationKey { get { return this._activationKey; } set { this._activationKey = value; } } // Check to see if ActivationKey property is set internal bool IsSetActivationKey() { return this._activationKey != null; } /// <summary> /// Gets and sets the property GatewayDisplayName. /// <para> /// The display name of the created gateway. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] public string GatewayDisplayName { get { return this._gatewayDisplayName; } set { this._gatewayDisplayName = value; } } // Check to see if GatewayDisplayName property is set internal bool IsSetGatewayDisplayName() { return this._gatewayDisplayName != null; } /// <summary> /// Gets and sets the property GatewayType. /// <para> /// The type of created gateway. /// </para> /// </summary> [AWSProperty(Required=true)] public GatewayType GatewayType { get { return this._gatewayType; } set { this._gatewayType = value; } } // Check to see if GatewayType property is set internal bool IsSetGatewayType() { return this._gatewayType != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// A list of up to 50 tags to assign to the gateway. Each tag is a key-value pair. /// </para> /// </summary> public List<Tag> 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; } } }
119
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the CreateGateway operation. /// </summary> public partial class CreateGatewayResponse : AmazonWebServiceResponse { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway you create. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the DeleteGateway operation. /// Deletes a backup gateway. /// </summary> public partial class DeleteGatewayRequest : AmazonBackupGatewayRequest { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway to delete. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the DeleteGateway operation. /// </summary> public partial class DeleteGatewayResponse : AmazonWebServiceResponse { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway you deleted. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the DeleteHypervisor operation. /// Deletes a hypervisor. /// </summary> public partial class DeleteHypervisorRequest : AmazonBackupGatewayRequest { private string _hypervisorArn; /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor to delete. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the DeleteHypervisor operation. /// </summary> public partial class DeleteHypervisorResponse : AmazonWebServiceResponse { private string _hypervisorArn; /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor you deleted. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the DisassociateGatewayFromServer operation. /// Disassociates a backup gateway from the specified server. After the disassociation /// process finishes, the gateway can no longer access the virtual machines on the server. /// </summary> public partial class DisassociateGatewayFromServerRequest : AmazonBackupGatewayRequest { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway to disassociate. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != null; } } }
60
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the DisassociateGatewayFromServer operation. /// </summary> public partial class DisassociateGatewayFromServerResponse : AmazonWebServiceResponse { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway you disassociated. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// A gateway is an Backup Gateway appliance that runs on the customer's network to provide /// seamless connectivity to backup storage in the Amazon Web Services Cloud. /// </summary> public partial class Gateway { private string _gatewayArn; private string _gatewayDisplayName; private GatewayType _gatewayType; private string _hypervisorId; private DateTime? _lastSeenTime; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation /// to return a list of gateways for your account and Amazon Web Services Region. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != null; } /// <summary> /// Gets and sets the property GatewayDisplayName. /// <para> /// The display name of the gateway. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public string GatewayDisplayName { get { return this._gatewayDisplayName; } set { this._gatewayDisplayName = value; } } // Check to see if GatewayDisplayName property is set internal bool IsSetGatewayDisplayName() { return this._gatewayDisplayName != null; } /// <summary> /// Gets and sets the property GatewayType. /// <para> /// The type of the gateway. /// </para> /// </summary> public GatewayType GatewayType { get { return this._gatewayType; } set { this._gatewayType = value; } } // Check to see if GatewayType property is set internal bool IsSetGatewayType() { return this._gatewayType != null; } /// <summary> /// Gets and sets the property HypervisorId. /// <para> /// The hypervisor ID of the gateway. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public string HypervisorId { get { return this._hypervisorId; } set { this._hypervisorId = value; } } // Check to see if HypervisorId property is set internal bool IsSetHypervisorId() { return this._hypervisorId != null; } /// <summary> /// Gets and sets the property LastSeenTime. /// <para> /// The last time Backup gateway communicated with the gateway, in Unix format and UTC /// time. /// </para> /// </summary> public DateTime LastSeenTime { get { return this._lastSeenTime.GetValueOrDefault(); } set { this._lastSeenTime = value; } } // Check to see if LastSeenTime property is set internal bool IsSetLastSeenTime() { return this._lastSeenTime.HasValue; } } }
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// The details of gateway. /// </summary> public partial class GatewayDetails { private string _gatewayArn; private string _gatewayDisplayName; private GatewayType _gatewayType; private string _hypervisorId; private DateTime? _lastSeenTime; private MaintenanceStartTime _maintenanceStartTime; private DateTime? _nextUpdateAvailabilityTime; private string _vpcEndpoint; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation /// to return a list of gateways for your account and Amazon Web Services Region. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != null; } /// <summary> /// Gets and sets the property GatewayDisplayName. /// <para> /// The display name of the gateway. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public string GatewayDisplayName { get { return this._gatewayDisplayName; } set { this._gatewayDisplayName = value; } } // Check to see if GatewayDisplayName property is set internal bool IsSetGatewayDisplayName() { return this._gatewayDisplayName != null; } /// <summary> /// Gets and sets the property GatewayType. /// <para> /// The type of the gateway type. /// </para> /// </summary> public GatewayType GatewayType { get { return this._gatewayType; } set { this._gatewayType = value; } } // Check to see if GatewayType property is set internal bool IsSetGatewayType() { return this._gatewayType != null; } /// <summary> /// Gets and sets the property HypervisorId. /// <para> /// The hypervisor ID of the gateway. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public string HypervisorId { get { return this._hypervisorId; } set { this._hypervisorId = value; } } // Check to see if HypervisorId property is set internal bool IsSetHypervisorId() { return this._hypervisorId != null; } /// <summary> /// Gets and sets the property LastSeenTime. /// <para> /// Details showing the last time Backup gateway communicated with the cloud, in Unix /// format and UTC time. /// </para> /// </summary> public DateTime LastSeenTime { get { return this._lastSeenTime.GetValueOrDefault(); } set { this._lastSeenTime = value; } } // Check to see if LastSeenTime property is set internal bool IsSetLastSeenTime() { return this._lastSeenTime.HasValue; } /// <summary> /// Gets and sets the property MaintenanceStartTime. /// <para> /// Returns your gateway's weekly maintenance start time including the day and time of /// the week. Note that values are in terms of the gateway's time zone. Can be weekly /// or monthly. /// </para> /// </summary> public MaintenanceStartTime MaintenanceStartTime { get { return this._maintenanceStartTime; } set { this._maintenanceStartTime = value; } } // Check to see if MaintenanceStartTime property is set internal bool IsSetMaintenanceStartTime() { return this._maintenanceStartTime != null; } /// <summary> /// Gets and sets the property NextUpdateAvailabilityTime. /// <para> /// Details showing the next update availability time of the gateway. /// </para> /// </summary> public DateTime NextUpdateAvailabilityTime { get { return this._nextUpdateAvailabilityTime.GetValueOrDefault(); } set { this._nextUpdateAvailabilityTime = value; } } // Check to see if NextUpdateAvailabilityTime property is set internal bool IsSetNextUpdateAvailabilityTime() { return this._nextUpdateAvailabilityTime.HasValue; } /// <summary> /// Gets and sets the property VpcEndpoint. /// <para> /// The DNS name for the virtual private cloud (VPC) endpoint the gateway uses to connect /// to the cloud for backup gateway. /// </para> /// </summary> [AWSProperty(Min=1, Max=255)] public string VpcEndpoint { get { return this._vpcEndpoint; } set { this._vpcEndpoint = value; } } // Check to see if VpcEndpoint property is set internal bool IsSetVpcEndpoint() { return this._vpcEndpoint != null; } } }
199
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the GetBandwidthRateLimitSchedule operation. /// Retrieves the bandwidth rate limit schedule for a specified gateway. By default, gateways /// do not have bandwidth rate limit schedules, which means no bandwidth rate limiting /// is in effect. Use this to get a gateway's bandwidth rate limit schedule. /// </summary> public partial class GetBandwidthRateLimitScheduleRequest : AmazonBackupGatewayRequest { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway. Use the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html"> /// <code>ListGateways</code> </a> operation to return a list of gateways for your account /// and Amazon Web Services Region. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != null; } } }
63
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the GetBandwidthRateLimitSchedule operation. /// </summary> public partial class GetBandwidthRateLimitScheduleResponse : AmazonWebServiceResponse { private List<BandwidthRateLimitInterval> _bandwidthRateLimitIntervals = new List<BandwidthRateLimitInterval>(); private string _gatewayArn; /// <summary> /// Gets and sets the property BandwidthRateLimitIntervals. /// <para> /// An array containing bandwidth rate limit schedule intervals for a gateway. When no /// bandwidth rate limit intervals have been scheduled, the array is empty. /// </para> /// </summary> [AWSProperty(Min=0, Max=20)] public List<BandwidthRateLimitInterval> BandwidthRateLimitIntervals { get { return this._bandwidthRateLimitIntervals; } set { this._bandwidthRateLimitIntervals = value; } } // Check to see if BandwidthRateLimitIntervals property is set internal bool IsSetBandwidthRateLimitIntervals() { return this._bandwidthRateLimitIntervals != null && this._bandwidthRateLimitIntervals.Count > 0; } /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway. Use the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html"> /// <code>ListGateways</code> </a> operation to return a list of gateways for your account /// and Amazon Web Services Region. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != null; } } }
81
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the GetGateway operation. /// By providing the ARN (Amazon Resource Name), this API returns the gateway. /// </summary> public partial class GetGatewayRequest : AmazonBackupGatewayRequest { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the GetGateway operation. /// </summary> public partial class GetGatewayResponse : AmazonWebServiceResponse { private GatewayDetails _gateway; /// <summary> /// Gets and sets the property Gateway. /// <para> /// By providing the ARN (Amazon Resource Name), this API returns the gateway. /// </para> /// </summary> public GatewayDetails Gateway { get { return this._gateway; } set { this._gateway = value; } } // Check to see if Gateway property is set internal bool IsSetGateway() { return this._gateway != null; } } }
57
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the GetHypervisorPropertyMappings operation. /// This action retrieves the property mappings for the specified hypervisor. A hypervisor /// property mapping displays the relationship of entity properties available from the /// on-premises hypervisor to the properties available in Amazon Web Services. /// </summary> public partial class GetHypervisorPropertyMappingsRequest : AmazonBackupGatewayRequest { private string _hypervisorArn; /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the GetHypervisorPropertyMappings operation. /// </summary> public partial class GetHypervisorPropertyMappingsResponse : AmazonWebServiceResponse { private string _hypervisorArn; private string _iamRoleArn; private List<VmwareToAwsTagMapping> _vmwareToAwsTagMappings = new List<VmwareToAwsTagMapping>(); /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != null; } /// <summary> /// Gets and sets the property IamRoleArn. /// <para> /// The Amazon Resource Name (ARN) of the IAM role. /// </para> /// </summary> [AWSProperty(Min=20, Max=2048)] public string IamRoleArn { get { return this._iamRoleArn; } set { this._iamRoleArn = value; } } // Check to see if IamRoleArn property is set internal bool IsSetIamRoleArn() { return this._iamRoleArn != null; } /// <summary> /// Gets and sets the property VmwareToAwsTagMappings. /// <para> /// This is a display of the mappings of on-premises VMware tags to the Amazon Web Services /// tags. /// </para> /// </summary> public List<VmwareToAwsTagMapping> VmwareToAwsTagMappings { get { return this._vmwareToAwsTagMappings; } set { this._vmwareToAwsTagMappings = value; } } // Check to see if VmwareToAwsTagMappings property is set internal bool IsSetVmwareToAwsTagMappings() { return this._vmwareToAwsTagMappings != null && this._vmwareToAwsTagMappings.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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the GetHypervisor operation. /// This action requests information about the specified hypervisor to which the gateway /// will connect. A hypervisor is hardware, software, or firmware that creates and manages /// virtual machines, and allocates resources to them. /// </summary> public partial class GetHypervisorRequest : AmazonBackupGatewayRequest { private string _hypervisorArn; /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the GetHypervisor operation. /// </summary> public partial class GetHypervisorResponse : AmazonWebServiceResponse { private HypervisorDetails _hypervisor; /// <summary> /// Gets and sets the property Hypervisor. /// <para> /// Details about the requested hypervisor. /// </para> /// </summary> public HypervisorDetails Hypervisor { get { return this._hypervisor; } set { this._hypervisor = value; } } // Check to see if Hypervisor property is set internal bool IsSetHypervisor() { return this._hypervisor != null; } } }
57
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the GetVirtualMachine operation. /// By providing the ARN (Amazon Resource Name), this API returns the virtual machine. /// </summary> public partial class GetVirtualMachineRequest : AmazonBackupGatewayRequest { private string _resourceArn; /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The Amazon Resource Name (ARN) of the virtual machine. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the GetVirtualMachine operation. /// </summary> public partial class GetVirtualMachineResponse : AmazonWebServiceResponse { private VirtualMachineDetails _virtualMachine; /// <summary> /// Gets and sets the property VirtualMachine. /// <para> /// This object contains the basic attributes of <code>VirtualMachine</code> contained /// by the output of <code>GetVirtualMachine</code> /// </para> /// </summary> public VirtualMachineDetails VirtualMachine { get { return this._virtualMachine; } set { this._virtualMachine = value; } } // Check to see if VirtualMachine property is set internal bool IsSetVirtualMachine() { return this._virtualMachine != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Represents the hypervisor's permissions to which the gateway will connect. /// /// /// <para> /// A hypervisor is hardware, software, or firmware that creates and manages virtual machines, /// and allocates resources to them. /// </para> /// </summary> public partial class Hypervisor { private string _host; private string _hypervisorArn; private string _kmsKeyArn; private string _name; private HypervisorState _state; /// <summary> /// Gets and sets the property Host. /// <para> /// The server host of the hypervisor. This can be either an IP address or a fully-qualified /// domain name (FQDN). /// </para> /// </summary> [AWSProperty(Min=3, Max=128)] public string Host { get { return this._host; } set { this._host = value; } } // Check to see if Host property is set internal bool IsSetHost() { return this._host != null; } /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != null; } /// <summary> /// Gets and sets the property KmsKeyArn. /// <para> /// The Amazon Resource Name (ARN) of the Key Management Service used to encrypt the hypervisor. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string KmsKeyArn { get { return this._kmsKeyArn; } set { this._kmsKeyArn = value; } } // Check to see if KmsKeyArn property is set internal bool IsSetKmsKeyArn() { return this._kmsKeyArn != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the hypervisor. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] 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; } /// <summary> /// Gets and sets the property State. /// <para> /// The state of the hypervisor. /// </para> /// </summary> public HypervisorState State { get { return this._state; } set { this._state = value; } } // Check to see if State property is set internal bool IsSetState() { return this._state != null; } } }
144
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// These are the details of the specified hypervisor. A hypervisor is hardware, software, /// or firmware that creates and manages virtual machines, and allocates resources to /// them. /// </summary> public partial class HypervisorDetails { private string _host; private string _hypervisorArn; private string _kmsKeyArn; private DateTime? _lastSuccessfulMetadataSyncTime; private SyncMetadataStatus _latestMetadataSyncStatus; private string _latestMetadataSyncStatusMessage; private string _logGroupArn; private string _name; private HypervisorState _state; /// <summary> /// Gets and sets the property Host. /// <para> /// The server host of the hypervisor. This can be either an IP address or a fully-qualified /// domain name (FQDN). /// </para> /// </summary> [AWSProperty(Min=3, Max=128)] public string Host { get { return this._host; } set { this._host = value; } } // Check to see if Host property is set internal bool IsSetHost() { return this._host != null; } /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != null; } /// <summary> /// Gets and sets the property KmsKeyArn. /// <para> /// The Amazon Resource Name (ARN) of the KMS used to encrypt the hypervisor. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string KmsKeyArn { get { return this._kmsKeyArn; } set { this._kmsKeyArn = value; } } // Check to see if KmsKeyArn property is set internal bool IsSetKmsKeyArn() { return this._kmsKeyArn != null; } /// <summary> /// Gets and sets the property LastSuccessfulMetadataSyncTime. /// <para> /// This is the time when the most recent successful sync of metadata occurred. /// </para> /// </summary> public DateTime LastSuccessfulMetadataSyncTime { get { return this._lastSuccessfulMetadataSyncTime.GetValueOrDefault(); } set { this._lastSuccessfulMetadataSyncTime = value; } } // Check to see if LastSuccessfulMetadataSyncTime property is set internal bool IsSetLastSuccessfulMetadataSyncTime() { return this._lastSuccessfulMetadataSyncTime.HasValue; } /// <summary> /// Gets and sets the property LatestMetadataSyncStatus. /// <para> /// This is the most recent status for the indicated metadata sync. /// </para> /// </summary> public SyncMetadataStatus LatestMetadataSyncStatus { get { return this._latestMetadataSyncStatus; } set { this._latestMetadataSyncStatus = value; } } // Check to see if LatestMetadataSyncStatus property is set internal bool IsSetLatestMetadataSyncStatus() { return this._latestMetadataSyncStatus != null; } /// <summary> /// Gets and sets the property LatestMetadataSyncStatusMessage. /// <para> /// This is the most recent status for the indicated metadata sync. /// </para> /// </summary> public string LatestMetadataSyncStatusMessage { get { return this._latestMetadataSyncStatusMessage; } set { this._latestMetadataSyncStatusMessage = value; } } // Check to see if LatestMetadataSyncStatusMessage property is set internal bool IsSetLatestMetadataSyncStatusMessage() { return this._latestMetadataSyncStatusMessage != null; } /// <summary> /// Gets and sets the property LogGroupArn. /// <para> /// The Amazon Resource Name (ARN) of the group of gateways within the requested log. /// </para> /// </summary> [AWSProperty(Min=0, Max=2048)] public string LogGroupArn { get { return this._logGroupArn; } set { this._logGroupArn = value; } } // Check to see if LogGroupArn property is set internal bool IsSetLogGroupArn() { return this._logGroupArn != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// This is the name of the specified hypervisor. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] 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; } /// <summary> /// Gets and sets the property State. /// <para> /// This is the current state of the specified hypervisor. /// </para> /// /// <para> /// The possible states are <code>PENDING</code>, <code>ONLINE</code>, <code>OFFLINE</code>, /// or <code>ERROR</code>. /// </para> /// </summary> public HypervisorState State { get { return this._state; } set { this._state = value; } } // Check to see if State property is set internal bool IsSetState() { return this._state != null; } } }
222
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the ImportHypervisorConfiguration operation. /// Connect to a hypervisor by importing its configuration. /// </summary> public partial class ImportHypervisorConfigurationRequest : AmazonBackupGatewayRequest { private string _host; private string _kmsKeyArn; private string _name; private string _password; private List<Tag> _tags = new List<Tag>(); private string _username; /// <summary> /// Gets and sets the property Host. /// <para> /// The server host of the hypervisor. This can be either an IP address or a fully-qualified /// domain name (FQDN). /// </para> /// </summary> [AWSProperty(Required=true, Min=3, Max=128)] public string Host { get { return this._host; } set { this._host = value; } } // Check to see if Host property is set internal bool IsSetHost() { return this._host != null; } /// <summary> /// Gets and sets the property KmsKeyArn. /// <para> /// The Key Management Service for the hypervisor. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string KmsKeyArn { get { return this._kmsKeyArn; } set { this._kmsKeyArn = value; } } // Check to see if KmsKeyArn property is set internal bool IsSetKmsKeyArn() { return this._kmsKeyArn != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the hypervisor. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=100)] 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; } /// <summary> /// Gets and sets the property Password. /// <para> /// The password for the hypervisor. /// </para> /// </summary> [AWSProperty(Sensitive=true, Min=1, Max=100)] public string Password { get { return this._password; } set { this._password = value; } } // Check to see if Password property is set internal bool IsSetPassword() { return this._password != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The tags of the hypervisor configuration to import. /// </para> /// </summary> public List<Tag> 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; } /// <summary> /// Gets and sets the property Username. /// <para> /// The username for the hypervisor. /// </para> /// </summary> [AWSProperty(Sensitive=true, Min=1, Max=100)] public string Username { get { return this._username; } set { this._username = value; } } // Check to see if Username property is set internal bool IsSetUsername() { return this._username != null; } } }
159
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the ImportHypervisorConfiguration operation. /// </summary> public partial class ImportHypervisorConfigurationResponse : AmazonWebServiceResponse { private string _hypervisorArn; /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor you disassociated. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// The operation did not succeed because an internal error occurred. Try again later. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class InternalServerException : AmazonBackupGatewayException { private string _errorCode; /// <summary> /// Constructs a new InternalServerException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public InternalServerException(string message) : base(message) {} /// <summary> /// Construct instance of InternalServerException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public InternalServerException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of InternalServerException /// </summary> /// <param name="innerException"></param> public InternalServerException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of InternalServerException /// </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 InternalServerException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of InternalServerException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public InternalServerException(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 InternalServerException 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 InternalServerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.ErrorCode = (string)info.GetValue("ErrorCode", 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("ErrorCode", this.ErrorCode); } #endif /// <summary> /// Gets and sets the property ErrorCode. /// <para> /// A description of which internal error occured. /// </para> /// </summary> public string ErrorCode { get { return this._errorCode; } set { this._errorCode = value; } } // Check to see if ErrorCode property is set internal bool IsSetErrorCode() { return this._errorCode != null; } } }
145
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the ListGateways operation. /// Lists backup gateways owned by an Amazon Web Services account in an Amazon Web Services /// Region. The returned list is ordered by gateway Amazon Resource Name (ARN). /// </summary> public partial class ListGatewaysRequest : AmazonBackupGatewayRequest { private int? _maxResults; private string _nextToken; /// <summary> /// Gets and sets the property MaxResults. /// <para> /// The maximum number of gateways to list. /// </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> /// The next item following a partial list of returned resources. For example, if a request /// is made to return <code>MaxResults</code> number of resources, <code>NextToken</code> /// allows you to return more items in your list starting at the location pointed to by /// the next token. /// </para> /// </summary> [AWSProperty(Min=1, Max=1000)] 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; } } }
83
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the ListGateways operation. /// </summary> public partial class ListGatewaysResponse : AmazonWebServiceResponse { private List<Gateway> _gateways = new List<Gateway>(); private string _nextToken; /// <summary> /// Gets and sets the property Gateways. /// <para> /// A list of your gateways. /// </para> /// </summary> public List<Gateway> Gateways { get { return this._gateways; } set { this._gateways = value; } } // Check to see if Gateways property is set internal bool IsSetGateways() { return this._gateways != null && this._gateways.Count > 0; } /// <summary> /// Gets and sets the property NextToken. /// <para> /// The next item following a partial list of returned resources. For example, if a request /// is made to return <code>maxResults</code> number of resources, <code>NextToken</code> /// allows you to return more items in your list starting at the location pointed to by /// the next token. /// </para> /// </summary> [AWSProperty(Min=1, Max=1000)] 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; } } }
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the ListHypervisors operation. /// Lists your hypervisors. /// </summary> public partial class ListHypervisorsRequest : AmazonBackupGatewayRequest { private int? _maxResults; private string _nextToken; /// <summary> /// Gets and sets the property MaxResults. /// <para> /// The maximum number of hypervisors to list. /// </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> /// The next item following a partial list of returned resources. For example, if a request /// is made to return <code>maxResults</code> number of resources, <code>NextToken</code> /// allows you to return more items in your list starting at the location pointed to by /// the next token. /// </para> /// </summary> [AWSProperty(Min=1, Max=1000)] 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; } } }
82
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the ListHypervisors operation. /// </summary> public partial class ListHypervisorsResponse : AmazonWebServiceResponse { private List<Hypervisor> _hypervisors = new List<Hypervisor>(); private string _nextToken; /// <summary> /// Gets and sets the property Hypervisors. /// <para> /// A list of your <code>Hypervisor</code> objects, ordered by their Amazon Resource Names /// (ARNs). /// </para> /// </summary> public List<Hypervisor> Hypervisors { get { return this._hypervisors; } set { this._hypervisors = value; } } // Check to see if Hypervisors property is set internal bool IsSetHypervisors() { return this._hypervisors != null && this._hypervisors.Count > 0; } /// <summary> /// Gets and sets the property NextToken. /// <para> /// The next item following a partial list of returned resources. For example, if a request /// is made to return <code>maxResults</code> number of resources, <code>NextToken</code> /// allows you to return more items in your list starting at the location pointed to by /// the next token. /// </para> /// </summary> [AWSProperty(Min=1, Max=1000)] public string NextToken { get { return this._nextToken; } set { this._nextToken = value; } } // Check to see if NextToken property is set internal bool IsSetNextToken() { return this._nextToken != null; } } }
81
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the ListTagsForResource operation. /// Lists the tags applied to the resource identified by its Amazon Resource Name (ARN). /// </summary> public partial class ListTagsForResourceRequest : AmazonBackupGatewayRequest { private string _resourceArn; /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The Amazon Resource Name (ARN) of the resource's tags to list. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the ListTagsForResource operation. /// </summary> public partial class ListTagsForResourceResponse : AmazonWebServiceResponse { private string _resourceArn; private List<Tag> _tags = new List<Tag>(); /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The Amazon Resource Name (ARN) of the resource's tags that you listed. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] 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> /// A list of the resource's tags. /// </para> /// </summary> public List<Tag> 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; } } }
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the ListVirtualMachines operation. /// Lists your virtual machines. /// </summary> public partial class ListVirtualMachinesRequest : AmazonBackupGatewayRequest { private string _hypervisorArn; private int? _maxResults; private string _nextToken; /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor connected to your virtual machine. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != null; } /// <summary> /// Gets and sets the property MaxResults. /// <para> /// The maximum number of virtual machines to list. /// </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> /// The next item following a partial list of returned resources. For example, if a request /// is made to return <code>maxResults</code> number of resources, <code>NextToken</code> /// allows you to return more items in your list starting at the location pointed to by /// the next token. /// </para> /// </summary> [AWSProperty(Min=1, Max=1000)] 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; } } }
102
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the ListVirtualMachines operation. /// </summary> public partial class ListVirtualMachinesResponse : AmazonWebServiceResponse { private string _nextToken; private List<VirtualMachine> _virtualMachines = new List<VirtualMachine>(); /// <summary> /// Gets and sets the property NextToken. /// <para> /// The next item following a partial list of returned resources. For example, if a request /// is made to return <code>maxResults</code> number of resources, <code>NextToken</code> /// allows you to return more items in your list starting at the location pointed to by /// the next token. /// </para> /// </summary> [AWSProperty(Min=1, Max=1000)] 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 VirtualMachines. /// <para> /// A list of your <code>VirtualMachine</code> objects, ordered by their Amazon Resource /// Names (ARNs). /// </para> /// </summary> public List<VirtualMachine> VirtualMachines { get { return this._virtualMachines; } set { this._virtualMachines = value; } } // Check to see if VirtualMachines property is set internal bool IsSetVirtualMachines() { return this._virtualMachines != null && this._virtualMachines.Count > 0; } } }
81
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is your gateway's weekly maintenance start time including the day and time of /// the week. Note that values are in terms of the gateway's time zone. Can be weekly /// or monthly. /// </summary> public partial class MaintenanceStartTime { private int? _dayOfMonth; private int? _dayOfWeek; private int? _hourOfDay; private int? _minuteOfHour; /// <summary> /// Gets and sets the property DayOfMonth. /// <para> /// The day of the month component of the maintenance start time represented as an ordinal /// number from 1 to 28, where 1 represents the first day of the month and 28 represents /// the last day of the month. /// </para> /// </summary> [AWSProperty(Min=1, Max=31)] public int DayOfMonth { get { return this._dayOfMonth.GetValueOrDefault(); } set { this._dayOfMonth = value; } } // Check to see if DayOfMonth property is set internal bool IsSetDayOfMonth() { return this._dayOfMonth.HasValue; } /// <summary> /// Gets and sets the property DayOfWeek. /// <para> /// An ordinal number between 0 and 6 that represents the day of the week, where 0 represents /// Sunday and 6 represents Saturday. The day of week is in the time zone of the gateway. /// </para> /// </summary> [AWSProperty(Min=0, Max=6)] public int DayOfWeek { get { return this._dayOfWeek.GetValueOrDefault(); } set { this._dayOfWeek = value; } } // Check to see if DayOfWeek property is set internal bool IsSetDayOfWeek() { return this._dayOfWeek.HasValue; } /// <summary> /// Gets and sets the property HourOfDay. /// <para> /// The hour component of the maintenance start time represented as <i>hh</i>, where <i>hh</i> /// is the hour (0 to 23). The hour of the day is in the time zone of the gateway. /// </para> /// </summary> [AWSProperty(Required=true, Min=0, Max=23)] public int HourOfDay { get { return this._hourOfDay.GetValueOrDefault(); } set { this._hourOfDay = value; } } // Check to see if HourOfDay property is set internal bool IsSetHourOfDay() { return this._hourOfDay.HasValue; } /// <summary> /// Gets and sets the property MinuteOfHour. /// <para> /// The minute component of the maintenance start time represented as <i>mm</i>, where /// <i>mm</i> is the minute (0 to 59). The minute of the hour is in the time zone of the /// gateway. /// </para> /// </summary> [AWSProperty(Required=true, Min=0, Max=59)] public int MinuteOfHour { get { return this._minuteOfHour.GetValueOrDefault(); } set { this._minuteOfHour = value; } } // Check to see if MinuteOfHour property is set internal bool IsSetMinuteOfHour() { return this._minuteOfHour.HasValue; } } }
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the PutBandwidthRateLimitSchedule operation. /// This action sets the bandwidth rate limit schedule for a specified gateway. By default, /// gateways do not have a bandwidth rate limit schedule, which means no bandwidth rate /// limiting is in effect. Use this to initiate a gateway's bandwidth rate limit schedule. /// </summary> public partial class PutBandwidthRateLimitScheduleRequest : AmazonBackupGatewayRequest { private List<BandwidthRateLimitInterval> _bandwidthRateLimitIntervals = new List<BandwidthRateLimitInterval>(); private string _gatewayArn; /// <summary> /// Gets and sets the property BandwidthRateLimitIntervals. /// <para> /// An array containing bandwidth rate limit schedule intervals for a gateway. When no /// bandwidth rate limit intervals have been scheduled, the array is empty. /// </para> /// </summary> [AWSProperty(Required=true, Min=0, Max=20)] public List<BandwidthRateLimitInterval> BandwidthRateLimitIntervals { get { return this._bandwidthRateLimitIntervals; } set { this._bandwidthRateLimitIntervals = value; } } // Check to see if BandwidthRateLimitIntervals property is set internal bool IsSetBandwidthRateLimitIntervals() { return this._bandwidthRateLimitIntervals != null && this._bandwidthRateLimitIntervals.Count > 0; } /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway. Use the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html"> /// <code>ListGateways</code> </a> operation to return a list of gateways for your account /// and Amazon Web Services Region. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != null; } } }
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the PutBandwidthRateLimitSchedule operation. /// </summary> public partial class PutBandwidthRateLimitScheduleResponse : AmazonWebServiceResponse { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway. Use the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html"> /// <code>ListGateways</code> </a> operation to return a list of gateways for your account /// and Amazon Web Services Region. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != null; } } }
60
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the PutHypervisorPropertyMappings operation. /// This action sets the property mappings for the specified hypervisor. A hypervisor /// property mapping displays the relationship of entity properties available from the /// on-premises hypervisor to the properties available in Amazon Web Services. /// </summary> public partial class PutHypervisorPropertyMappingsRequest : AmazonBackupGatewayRequest { private string _hypervisorArn; private string _iamRoleArn; private List<VmwareToAwsTagMapping> _vmwareToAwsTagMappings = new List<VmwareToAwsTagMapping>(); /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != null; } /// <summary> /// Gets and sets the property IamRoleArn. /// <para> /// The Amazon Resource Name (ARN) of the IAM role. /// </para> /// </summary> [AWSProperty(Required=true, Min=20, Max=2048)] public string IamRoleArn { get { return this._iamRoleArn; } set { this._iamRoleArn = value; } } // Check to see if IamRoleArn property is set internal bool IsSetIamRoleArn() { return this._iamRoleArn != null; } /// <summary> /// Gets and sets the property VmwareToAwsTagMappings. /// <para> /// This action requests the mappings of on-premises VMware tags to the Amazon Web Services /// tags. /// </para> /// </summary> [AWSProperty(Required=true)] public List<VmwareToAwsTagMapping> VmwareToAwsTagMappings { get { return this._vmwareToAwsTagMappings; } set { this._vmwareToAwsTagMappings = value; } } // Check to see if VmwareToAwsTagMappings property is set internal bool IsSetVmwareToAwsTagMappings() { return this._vmwareToAwsTagMappings != null && this._vmwareToAwsTagMappings.Count > 0; } } }
102
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the PutHypervisorPropertyMappings operation. /// </summary> public partial class PutHypervisorPropertyMappingsResponse : AmazonWebServiceResponse { private string _hypervisorArn; /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the PutMaintenanceStartTime operation. /// Set the maintenance start time for a gateway. /// </summary> public partial class PutMaintenanceStartTimeRequest : AmazonBackupGatewayRequest { private int? _dayOfMonth; private int? _dayOfWeek; private string _gatewayArn; private int? _hourOfDay; private int? _minuteOfHour; /// <summary> /// Gets and sets the property DayOfMonth. /// <para> /// The day of the month start maintenance on a gateway. /// </para> /// /// <para> /// Valid values range from <code>Sunday</code> to <code>Saturday</code>. /// </para> /// </summary> [AWSProperty(Min=1, Max=31)] public int DayOfMonth { get { return this._dayOfMonth.GetValueOrDefault(); } set { this._dayOfMonth = value; } } // Check to see if DayOfMonth property is set internal bool IsSetDayOfMonth() { return this._dayOfMonth.HasValue; } /// <summary> /// Gets and sets the property DayOfWeek. /// <para> /// The day of the week to start maintenance on a gateway. /// </para> /// </summary> [AWSProperty(Min=0, Max=6)] public int DayOfWeek { get { return this._dayOfWeek.GetValueOrDefault(); } set { this._dayOfWeek = value; } } // Check to see if DayOfWeek property is set internal bool IsSetDayOfWeek() { return this._dayOfWeek.HasValue; } /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) for the gateway, used to specify its maintenance start /// time. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != null; } /// <summary> /// Gets and sets the property HourOfDay. /// <para> /// The hour of the day to start maintenance on a gateway. /// </para> /// </summary> [AWSProperty(Required=true, Min=0, Max=23)] public int HourOfDay { get { return this._hourOfDay.GetValueOrDefault(); } set { this._hourOfDay = value; } } // Check to see if HourOfDay property is set internal bool IsSetHourOfDay() { return this._hourOfDay.HasValue; } /// <summary> /// Gets and sets the property MinuteOfHour. /// <para> /// The minute of the hour to start maintenance on a gateway. /// </para> /// </summary> [AWSProperty(Required=true, Min=0, Max=59)] public int MinuteOfHour { get { return this._minuteOfHour.GetValueOrDefault(); } set { this._minuteOfHour = value; } } // Check to see if MinuteOfHour property is set internal bool IsSetMinuteOfHour() { return this._minuteOfHour.HasValue; } } }
144
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the PutMaintenanceStartTime operation. /// </summary> public partial class PutMaintenanceStartTimeResponse : AmazonWebServiceResponse { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of a gateway for which you set the maintenance start /// time. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// A resource that is required for the action wasn't found. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class ResourceNotFoundException : AmazonBackupGatewayException { private string _errorCode; /// <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.ErrorCode = (string)info.GetValue("ErrorCode", 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("ErrorCode", this.ErrorCode); } #endif /// <summary> /// Gets and sets the property ErrorCode. /// <para> /// A description of which resource wasn't found. /// </para> /// </summary> public string ErrorCode { get { return this._errorCode; } set { this._errorCode = value; } } // Check to see if ErrorCode property is set internal bool IsSetErrorCode() { return this._errorCode != null; } } }
145
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the StartVirtualMachinesMetadataSync operation. /// This action sends a request to sync metadata across the specified virtual machines. /// </summary> public partial class StartVirtualMachinesMetadataSyncRequest : AmazonBackupGatewayRequest { private string _hypervisorArn; /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the StartVirtualMachinesMetadataSync operation. /// </summary> public partial class StartVirtualMachinesMetadataSyncResponse : AmazonWebServiceResponse { private string _hypervisorArn; /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// A key-value pair you can use to manage, filter, and search for your resources. Allowed /// characters include UTF-8 letters, numbers, spaces, and the following characters: + /// - = . _ : /. /// </summary> public partial class Tag { private string _key; private string _value; /// <summary> /// Gets and sets the property Key. /// <para> /// The key part of a tag's key-value pair. The key can't start with <code>aws:</code>. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=128)] 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 Value. /// <para> /// The value part of a tag's key-value pair. /// </para> /// </summary> [AWSProperty(Required=true, Min=0, Max=256)] 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; } } }
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the TagResource operation. /// Tag the resource. /// </summary> public partial class TagResourceRequest : AmazonBackupGatewayRequest { private string _resourceARN; private List<Tag> _tags = new List<Tag>(); /// <summary> /// Gets and sets the property ResourceARN. /// <para> /// The Amazon Resource Name (ARN) of the resource to tag. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] 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> /// A list of tags to assign to the resource. /// </para> /// </summary> [AWSProperty(Required=true)] public List<Tag> 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the TagResource operation. /// </summary> public partial class TagResourceResponse : AmazonWebServiceResponse { private string _resourceARN; /// <summary> /// Gets and sets the property ResourceARN. /// <para> /// The Amazon Resource Name (ARN) of the resource you tagged. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] 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; } } }
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the TestHypervisorConfiguration operation. /// Tests your hypervisor configuration to validate that backup gateway can connect with /// the hypervisor and its resources. /// </summary> public partial class TestHypervisorConfigurationRequest : AmazonBackupGatewayRequest { private string _gatewayArn; private string _host; private string _password; private string _username; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway to the hypervisor to test. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != null; } /// <summary> /// Gets and sets the property Host. /// <para> /// The server host of the hypervisor. This can be either an IP address or a fully-qualified /// domain name (FQDN). /// </para> /// </summary> [AWSProperty(Required=true, Min=3, Max=128)] public string Host { get { return this._host; } set { this._host = value; } } // Check to see if Host property is set internal bool IsSetHost() { return this._host != null; } /// <summary> /// Gets and sets the property Password. /// <para> /// The password for the hypervisor. /// </para> /// </summary> [AWSProperty(Sensitive=true, Min=1, Max=100)] public string Password { get { return this._password; } set { this._password = value; } } // Check to see if Password property is set internal bool IsSetPassword() { return this._password != null; } /// <summary> /// Gets and sets the property Username. /// <para> /// The username for the hypervisor. /// </para> /// </summary> [AWSProperty(Sensitive=true, Min=1, Max=100)] public string Username { get { return this._username; } set { this._username = value; } } // Check to see if Username property is set internal bool IsSetUsername() { return this._username != null; } } }
121
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the TestHypervisorConfiguration operation. /// </summary> public partial class TestHypervisorConfigurationResponse : 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// TPS has been limited to protect against intentional or unintentional high request /// volumes. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class ThrottlingException : AmazonBackupGatewayException { private string _errorCode; /// <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.ErrorCode = (string)info.GetValue("ErrorCode", 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("ErrorCode", this.ErrorCode); } #endif /// <summary> /// Gets and sets the property ErrorCode. /// <para> /// Error: TPS has been limited to protect against intentional or unintentional high request /// volumes. /// </para> /// </summary> [AWSProperty(Required=true)] public string ErrorCode { get { return this._errorCode; } set { this._errorCode = value; } } // Check to see if ErrorCode property is set internal bool IsSetErrorCode() { return this._errorCode != null; } } }
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the UntagResource operation. /// Removes tags from the resource. /// </summary> public partial class UntagResourceRequest : AmazonBackupGatewayRequest { private string _resourceARN; private List<string> _tagKeys = new List<string>(); /// <summary> /// Gets and sets the property ResourceARN. /// <para> /// The Amazon Resource Name (ARN) of the resource from which to remove tags. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] 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 list of tag keys specifying which tags to remove. /// </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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the UntagResource operation. /// </summary> public partial class UntagResourceResponse : AmazonWebServiceResponse { private string _resourceARN; /// <summary> /// Gets and sets the property ResourceARN. /// <para> /// The Amazon Resource Name (ARN) of the resource from which you removed tags. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] 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; } } }
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the UpdateGatewayInformation operation. /// Updates a gateway's name. Specify which gateway to update using the Amazon Resource /// Name (ARN) of the gateway in your request. /// </summary> public partial class UpdateGatewayInformationRequest : AmazonBackupGatewayRequest { private string _gatewayArn; private string _gatewayDisplayName; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway to update. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != null; } /// <summary> /// Gets and sets the property GatewayDisplayName. /// <para> /// The updated display name of the gateway. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public string GatewayDisplayName { get { return this._gatewayDisplayName; } set { this._gatewayDisplayName = value; } } // Check to see if GatewayDisplayName property is set internal bool IsSetGatewayDisplayName() { return this._gatewayDisplayName != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the UpdateGatewayInformation operation. /// </summary> public partial class UpdateGatewayInformationResponse : AmazonWebServiceResponse { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway you updated. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the UpdateGatewaySoftwareNow operation. /// Updates the gateway virtual machine (VM) software. The request immediately triggers /// the software update. /// /// <note> /// <para> /// When you make this request, you get a <code>200 OK</code> success response immediately. /// However, it might take some time for the update to complete. /// </para> /// </note> /// </summary> public partial class UpdateGatewaySoftwareNowRequest : AmazonBackupGatewayRequest { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway to be updated. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the UpdateGatewaySoftwareNow operation. /// </summary> public partial class UpdateGatewaySoftwareNowResponse : AmazonWebServiceResponse { private string _gatewayArn; /// <summary> /// Gets and sets the property GatewayArn. /// <para> /// The Amazon Resource Name (ARN) of the gateway you updated. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string GatewayArn { get { return this._gatewayArn; } set { this._gatewayArn = value; } } // Check to see if GatewayArn property is set internal bool IsSetGatewayArn() { return this._gatewayArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Container for the parameters to the UpdateHypervisor operation. /// Updates a hypervisor metadata, including its host, username, and password. Specify /// which hypervisor to update using the Amazon Resource Name (ARN) of the hypervisor /// in your request. /// </summary> public partial class UpdateHypervisorRequest : AmazonBackupGatewayRequest { private string _host; private string _hypervisorArn; private string _logGroupArn; private string _name; private string _password; private string _username; /// <summary> /// Gets and sets the property Host. /// <para> /// The updated host of the hypervisor. This can be either an IP address or a fully-qualified /// domain name (FQDN). /// </para> /// </summary> [AWSProperty(Min=3, Max=128)] public string Host { get { return this._host; } set { this._host = value; } } // Check to see if Host property is set internal bool IsSetHost() { return this._host != null; } /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor to update. /// </para> /// </summary> [AWSProperty(Required=true, Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != null; } /// <summary> /// Gets and sets the property LogGroupArn. /// <para> /// The Amazon Resource Name (ARN) of the group of gateways within the requested log. /// </para> /// </summary> [AWSProperty(Min=0, Max=2048)] public string LogGroupArn { get { return this._logGroupArn; } set { this._logGroupArn = value; } } // Check to see if LogGroupArn property is set internal bool IsSetLogGroupArn() { return this._logGroupArn != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The updated name for the hypervisor /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] 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; } /// <summary> /// Gets and sets the property Password. /// <para> /// The updated password for the hypervisor. /// </para> /// </summary> [AWSProperty(Sensitive=true, Min=1, Max=100)] public string Password { get { return this._password; } set { this._password = value; } } // Check to see if Password property is set internal bool IsSetPassword() { return this._password != null; } /// <summary> /// Gets and sets the property Username. /// <para> /// The updated username for the hypervisor. /// </para> /// </summary> [AWSProperty(Sensitive=true, Min=1, Max=100)] public string Username { get { return this._username; } set { this._username = value; } } // Check to see if Username property is set internal bool IsSetUsername() { return this._username != null; } } }
162
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This is the response object from the UpdateHypervisor operation. /// </summary> public partial class UpdateHypervisorResponse : AmazonWebServiceResponse { private string _hypervisorArn; /// <summary> /// Gets and sets the property HypervisorArn. /// <para> /// The Amazon Resource Name (ARN) of the hypervisor you updated. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] public string HypervisorArn { get { return this._hypervisorArn; } set { this._hypervisorArn = value; } } // Check to see if HypervisorArn property is set internal bool IsSetHypervisorArn() { return this._hypervisorArn != 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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// The operation did not succeed because a validation error occurred. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class ValidationException : AmazonBackupGatewayException { private string _errorCode; /// <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.ErrorCode = (string)info.GetValue("ErrorCode", 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("ErrorCode", this.ErrorCode); } #endif /// <summary> /// Gets and sets the property ErrorCode. /// <para> /// A description of what caused the validation error. /// </para> /// </summary> public string ErrorCode { get { return this._errorCode; } set { this._errorCode = value; } } // Check to see if ErrorCode property is set internal bool IsSetErrorCode() { return this._errorCode != null; } } }
145
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// A virtual machine that is on a hypervisor. /// </summary> public partial class VirtualMachine { private string _hostName; private string _hypervisorId; private DateTime? _lastBackupDate; private string _name; private string _path; private string _resourceArn; /// <summary> /// Gets and sets the property HostName. /// <para> /// The host name of the virtual machine. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public string HostName { get { return this._hostName; } set { this._hostName = value; } } // Check to see if HostName property is set internal bool IsSetHostName() { return this._hostName != null; } /// <summary> /// Gets and sets the property HypervisorId. /// <para> /// The ID of the virtual machine's hypervisor. /// </para> /// </summary> public string HypervisorId { get { return this._hypervisorId; } set { this._hypervisorId = value; } } // Check to see if HypervisorId property is set internal bool IsSetHypervisorId() { return this._hypervisorId != null; } /// <summary> /// Gets and sets the property LastBackupDate. /// <para> /// The most recent date a virtual machine was backed up, in Unix format and UTC time. /// </para> /// </summary> public DateTime LastBackupDate { get { return this._lastBackupDate.GetValueOrDefault(); } set { this._lastBackupDate = value; } } // Check to see if LastBackupDate property is set internal bool IsSetLastBackupDate() { return this._lastBackupDate.HasValue; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the virtual machine. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] 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; } /// <summary> /// Gets and sets the property Path. /// <para> /// The path of the virtual machine. /// </para> /// </summary> [AWSProperty(Min=1, Max=4096)] public string Path { get { return this._path; } set { this._path = value; } } // Check to see if Path property is set internal bool IsSetPath() { return this._path != null; } /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The Amazon Resource Name (ARN) of the virtual machine. For example, <code>arn:aws:backup-gateway:us-west-1:0000000000000:vm/vm-0000ABCDEFGIJKL</code>. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] 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; } } }
156
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// Your <code>VirtualMachine</code> objects, ordered by their Amazon Resource Names (ARNs). /// </summary> public partial class VirtualMachineDetails { private string _hostName; private string _hypervisorId; private DateTime? _lastBackupDate; private string _name; private string _path; private string _resourceArn; private List<VmwareTag> _vmwareTags = new List<VmwareTag>(); /// <summary> /// Gets and sets the property HostName. /// <para> /// The host name of the virtual machine. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] public string HostName { get { return this._hostName; } set { this._hostName = value; } } // Check to see if HostName property is set internal bool IsSetHostName() { return this._hostName != null; } /// <summary> /// Gets and sets the property HypervisorId. /// <para> /// The ID of the virtual machine's hypervisor. /// </para> /// </summary> public string HypervisorId { get { return this._hypervisorId; } set { this._hypervisorId = value; } } // Check to see if HypervisorId property is set internal bool IsSetHypervisorId() { return this._hypervisorId != null; } /// <summary> /// Gets and sets the property LastBackupDate. /// <para> /// The most recent date a virtual machine was backed up, in Unix format and UTC time. /// </para> /// </summary> public DateTime LastBackupDate { get { return this._lastBackupDate.GetValueOrDefault(); } set { this._lastBackupDate = value; } } // Check to see if LastBackupDate property is set internal bool IsSetLastBackupDate() { return this._lastBackupDate.HasValue; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the virtual machine. /// </para> /// </summary> [AWSProperty(Min=1, Max=100)] 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; } /// <summary> /// Gets and sets the property Path. /// <para> /// The path of the virtual machine. /// </para> /// </summary> [AWSProperty(Min=1, Max=4096)] public string Path { get { return this._path; } set { this._path = value; } } // Check to see if Path property is set internal bool IsSetPath() { return this._path != null; } /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The Amazon Resource Name (ARN) of the virtual machine. For example, <code>arn:aws:backup-gateway:us-west-1:0000000000000:vm/vm-0000ABCDEFGIJKL</code>. /// </para> /// </summary> [AWSProperty(Min=50, Max=500)] 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 VmwareTags. /// <para> /// These are the details of the VMware tags associated with the specified virtual machine. /// </para> /// </summary> public List<VmwareTag> VmwareTags { get { return this._vmwareTags; } set { this._vmwareTags = value; } } // Check to see if VmwareTags property is set internal bool IsSetVmwareTags() { return this._vmwareTags != null && this._vmwareTags.Count > 0; } } }
175
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// A VMware tag is a tag attached to a specific virtual machine. A <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_Tag.html">tag</a> /// is a key-value pair you can use to manage, filter, and search for your resources. /// /// /// <para> /// The content of VMware tags can be matched to Amazon Web Services tags. /// </para> /// </summary> public partial class VmwareTag { private string _vmwareCategory; private string _vmwareTagDescription; private string _vmwareTagName; /// <summary> /// Gets and sets the property VmwareCategory. /// <para> /// The is the category of VMware. /// </para> /// </summary> [AWSProperty(Min=1, Max=80)] public string VmwareCategory { get { return this._vmwareCategory; } set { this._vmwareCategory = value; } } // Check to see if VmwareCategory property is set internal bool IsSetVmwareCategory() { return this._vmwareCategory != null; } /// <summary> /// Gets and sets the property VmwareTagDescription. /// <para> /// This is a user-defined description of a VMware tag. /// </para> /// </summary> public string VmwareTagDescription { get { return this._vmwareTagDescription; } set { this._vmwareTagDescription = value; } } // Check to see if VmwareTagDescription property is set internal bool IsSetVmwareTagDescription() { return this._vmwareTagDescription != null; } /// <summary> /// Gets and sets the property VmwareTagName. /// <para> /// This is the user-defined name of a VMware tag. /// </para> /// </summary> [AWSProperty(Min=1, Max=80)] public string VmwareTagName { get { return this._vmwareTagName; } set { this._vmwareTagName = value; } } // Check to see if VmwareTagName property is set internal bool IsSetVmwareTagName() { return this._vmwareTagName != null; } } }
103
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 backup-gateway-2021-01-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.BackupGateway.Model { /// <summary> /// This displays the mapping of on-premises VMware tags to the corresponding Amazon Web /// Services tags. /// </summary> public partial class VmwareToAwsTagMapping { private string _awsTagKey; private string _awsTagValue; private string _vmwareCategory; private string _vmwareTagName; /// <summary> /// Gets and sets the property AwsTagKey. /// <para> /// The key part of the Amazon Web Services tag's key-value pair. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=128)] public string AwsTagKey { get { return this._awsTagKey; } set { this._awsTagKey = value; } } // Check to see if AwsTagKey property is set internal bool IsSetAwsTagKey() { return this._awsTagKey != null; } /// <summary> /// Gets and sets the property AwsTagValue. /// <para> /// The value part of the Amazon Web Services tag's key-value pair. /// </para> /// </summary> [AWSProperty(Required=true, Min=0, Max=256)] public string AwsTagValue { get { return this._awsTagValue; } set { this._awsTagValue = value; } } // Check to see if AwsTagValue property is set internal bool IsSetAwsTagValue() { return this._awsTagValue != null; } /// <summary> /// Gets and sets the property VmwareCategory. /// <para> /// The is the category of VMware. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=80)] public string VmwareCategory { get { return this._vmwareCategory; } set { this._vmwareCategory = value; } } // Check to see if VmwareCategory property is set internal bool IsSetVmwareCategory() { return this._vmwareCategory != null; } /// <summary> /// Gets and sets the property VmwareTagName. /// <para> /// This is the user-defined name of a VMware tag. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=80)] public string VmwareTagName { get { return this._vmwareTagName; } set { this._vmwareTagName = value; } } // Check to see if VmwareTagName property is set internal bool IsSetVmwareTagName() { return this._vmwareTagName != null; } } }
119
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.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)) { if (context.TestExpression("ErrorCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ErrorCode = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AccessDeniedExceptionUnmarshaller _instance = new AccessDeniedExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AccessDeniedExceptionUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// AssociateGatewayToServer Request Marshaller /// </summary> public class AssociateGatewayToServerRequestMarshaller : IMarshaller<IRequest, AssociateGatewayToServerRequest> , 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((AssociateGatewayToServerRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(AssociateGatewayToServerRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.AssociateGatewayToServer"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetGatewayArn()) { context.Writer.WritePropertyName("GatewayArn"); context.Writer.Write(publicRequest.GatewayArn); } if(publicRequest.IsSetServerArn()) { context.Writer.WritePropertyName("ServerArn"); context.Writer.Write(publicRequest.ServerArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static AssociateGatewayToServerRequestMarshaller _instance = new AssociateGatewayToServerRequestMarshaller(); internal static AssociateGatewayToServerRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static AssociateGatewayToServerRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AssociateGatewayToServer operation /// </summary> public class AssociateGatewayToServerResponseUnmarshaller : 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) { AssociateGatewayToServerResponse response = new AssociateGatewayToServerResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("GatewayArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayArn = 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("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("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBackupGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static AssociateGatewayToServerResponseUnmarshaller _instance = new AssociateGatewayToServerResponseUnmarshaller(); internal static AssociateGatewayToServerResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static AssociateGatewayToServerResponseUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// BandwidthRateLimitInterval Marshaller /// </summary> public class BandwidthRateLimitIntervalMarshaller : IRequestMarshaller<BandwidthRateLimitInterval, 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(BandwidthRateLimitInterval requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAverageUploadRateLimitInBitsPerSec()) { context.Writer.WritePropertyName("AverageUploadRateLimitInBitsPerSec"); context.Writer.Write(requestObject.AverageUploadRateLimitInBitsPerSec); } if(requestObject.IsSetDaysOfWeek()) { context.Writer.WritePropertyName("DaysOfWeek"); context.Writer.WriteArrayStart(); foreach(var requestObjectDaysOfWeekListValue in requestObject.DaysOfWeek) { context.Writer.Write(requestObjectDaysOfWeekListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetEndHourOfDay()) { context.Writer.WritePropertyName("EndHourOfDay"); context.Writer.Write(requestObject.EndHourOfDay); } if(requestObject.IsSetEndMinuteOfHour()) { context.Writer.WritePropertyName("EndMinuteOfHour"); context.Writer.Write(requestObject.EndMinuteOfHour); } if(requestObject.IsSetStartHourOfDay()) { context.Writer.WritePropertyName("StartHourOfDay"); context.Writer.Write(requestObject.StartHourOfDay); } if(requestObject.IsSetStartMinuteOfHour()) { context.Writer.WritePropertyName("StartMinuteOfHour"); context.Writer.Write(requestObject.StartMinuteOfHour); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BandwidthRateLimitIntervalMarshaller Instance = new BandwidthRateLimitIntervalMarshaller(); } }
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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BandwidthRateLimitInterval Object /// </summary> public class BandwidthRateLimitIntervalUnmarshaller : IUnmarshaller<BandwidthRateLimitInterval, XmlUnmarshallerContext>, IUnmarshaller<BandwidthRateLimitInterval, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BandwidthRateLimitInterval IUnmarshaller<BandwidthRateLimitInterval, 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 BandwidthRateLimitInterval Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BandwidthRateLimitInterval unmarshalledObject = new BandwidthRateLimitInterval(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AverageUploadRateLimitInBitsPerSec", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.AverageUploadRateLimitInBitsPerSec = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DaysOfWeek", targetDepth)) { var unmarshaller = new ListUnmarshaller<int, IntUnmarshaller>(IntUnmarshaller.Instance); unmarshalledObject.DaysOfWeek = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EndHourOfDay", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.EndHourOfDay = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EndMinuteOfHour", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.EndMinuteOfHour = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StartHourOfDay", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.StartHourOfDay = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StartMinuteOfHour", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.StartMinuteOfHour = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BandwidthRateLimitIntervalUnmarshaller _instance = new BandwidthRateLimitIntervalUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BandwidthRateLimitIntervalUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.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("ErrorCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ErrorCode = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ConflictExceptionUnmarshaller _instance = new ConflictExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ConflictExceptionUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateGateway Request Marshaller /// </summary> public class CreateGatewayRequestMarshaller : IMarshaller<IRequest, CreateGatewayRequest> , 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((CreateGatewayRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateGatewayRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.CreateGateway"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetActivationKey()) { context.Writer.WritePropertyName("ActivationKey"); context.Writer.Write(publicRequest.ActivationKey); } if(publicRequest.IsSetGatewayDisplayName()) { context.Writer.WritePropertyName("GatewayDisplayName"); context.Writer.Write(publicRequest.GatewayDisplayName); } if(publicRequest.IsSetGatewayType()) { context.Writer.WritePropertyName("GatewayType"); context.Writer.Write(publicRequest.GatewayType); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateGatewayRequestMarshaller _instance = new CreateGatewayRequestMarshaller(); internal static CreateGatewayRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateGatewayRequestMarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateGateway operation /// </summary> public class CreateGatewayResponseUnmarshaller : 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) { CreateGatewayResponse response = new CreateGatewayResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("GatewayArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayArn = 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("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 AmazonBackupGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateGatewayResponseUnmarshaller _instance = new CreateGatewayResponseUnmarshaller(); internal static CreateGatewayResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateGatewayResponseUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// DeleteGateway Request Marshaller /// </summary> public class DeleteGatewayRequestMarshaller : IMarshaller<IRequest, DeleteGatewayRequest> , 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((DeleteGatewayRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteGatewayRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.DeleteGateway"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetGatewayArn()) { context.Writer.WritePropertyName("GatewayArn"); context.Writer.Write(publicRequest.GatewayArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteGatewayRequestMarshaller _instance = new DeleteGatewayRequestMarshaller(); internal static DeleteGatewayRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteGatewayRequestMarshaller Instance { get { return _instance; } } } }
103
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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteGateway operation /// </summary> public class DeleteGatewayResponseUnmarshaller : 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) { DeleteGatewayResponse response = new DeleteGatewayResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("GatewayArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayArn = 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("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 AmazonBackupGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteGatewayResponseUnmarshaller _instance = new DeleteGatewayResponseUnmarshaller(); internal static DeleteGatewayResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteGatewayResponseUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// DeleteHypervisor Request Marshaller /// </summary> public class DeleteHypervisorRequestMarshaller : IMarshaller<IRequest, DeleteHypervisorRequest> , 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((DeleteHypervisorRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteHypervisorRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.DeleteHypervisor"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetHypervisorArn()) { context.Writer.WritePropertyName("HypervisorArn"); context.Writer.Write(publicRequest.HypervisorArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteHypervisorRequestMarshaller _instance = new DeleteHypervisorRequestMarshaller(); internal static DeleteHypervisorRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteHypervisorRequestMarshaller Instance { get { return _instance; } } } }
103
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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteHypervisor operation /// </summary> public class DeleteHypervisorResponseUnmarshaller : 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) { DeleteHypervisorResponse response = new DeleteHypervisorResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("HypervisorArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.HypervisorArn = 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("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBackupGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteHypervisorResponseUnmarshaller _instance = new DeleteHypervisorResponseUnmarshaller(); internal static DeleteHypervisorResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteHypervisorResponseUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// DisassociateGatewayFromServer Request Marshaller /// </summary> public class DisassociateGatewayFromServerRequestMarshaller : IMarshaller<IRequest, DisassociateGatewayFromServerRequest> , 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((DisassociateGatewayFromServerRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DisassociateGatewayFromServerRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.DisassociateGatewayFromServer"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetGatewayArn()) { context.Writer.WritePropertyName("GatewayArn"); context.Writer.Write(publicRequest.GatewayArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DisassociateGatewayFromServerRequestMarshaller _instance = new DisassociateGatewayFromServerRequestMarshaller(); internal static DisassociateGatewayFromServerRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateGatewayFromServerRequestMarshaller Instance { get { return _instance; } } } }
103
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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DisassociateGatewayFromServer operation /// </summary> public class DisassociateGatewayFromServerResponseUnmarshaller : 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) { DisassociateGatewayFromServerResponse response = new DisassociateGatewayFromServerResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("GatewayArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayArn = 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("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("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBackupGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DisassociateGatewayFromServerResponseUnmarshaller _instance = new DisassociateGatewayFromServerResponseUnmarshaller(); internal static DisassociateGatewayFromServerResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateGatewayFromServerResponseUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewayDetails Object /// </summary> public class GatewayDetailsUnmarshaller : IUnmarshaller<GatewayDetails, XmlUnmarshallerContext>, IUnmarshaller<GatewayDetails, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewayDetails IUnmarshaller<GatewayDetails, 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 GatewayDetails Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewayDetails unmarshalledObject = new GatewayDetails(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("GatewayArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GatewayArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayDisplayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GatewayDisplayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GatewayType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HypervisorId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.HypervisorId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastSeenTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastSeenTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaintenanceStartTime", targetDepth)) { var unmarshaller = MaintenanceStartTimeUnmarshaller.Instance; unmarshalledObject.MaintenanceStartTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextUpdateAvailabilityTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.NextUpdateAvailabilityTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VpcEndpoint", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VpcEndpoint = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayDetailsUnmarshaller _instance = new GatewayDetailsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayDetailsUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Gateway Object /// </summary> public class GatewayUnmarshaller : IUnmarshaller<Gateway, XmlUnmarshallerContext>, IUnmarshaller<Gateway, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Gateway IUnmarshaller<Gateway, 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 Gateway Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Gateway unmarshalledObject = new Gateway(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("GatewayArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GatewayArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayDisplayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GatewayDisplayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GatewayType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HypervisorId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.HypervisorId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastSeenTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastSeenTime = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayUnmarshaller _instance = new GatewayUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// GetBandwidthRateLimitSchedule Request Marshaller /// </summary> public class GetBandwidthRateLimitScheduleRequestMarshaller : IMarshaller<IRequest, GetBandwidthRateLimitScheduleRequest> , 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((GetBandwidthRateLimitScheduleRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetBandwidthRateLimitScheduleRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.GetBandwidthRateLimitSchedule"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetGatewayArn()) { context.Writer.WritePropertyName("GatewayArn"); context.Writer.Write(publicRequest.GatewayArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static GetBandwidthRateLimitScheduleRequestMarshaller _instance = new GetBandwidthRateLimitScheduleRequestMarshaller(); internal static GetBandwidthRateLimitScheduleRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetBandwidthRateLimitScheduleRequestMarshaller Instance { get { return _instance; } } } }
103
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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetBandwidthRateLimitSchedule operation /// </summary> public class GetBandwidthRateLimitScheduleResponseUnmarshaller : 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) { GetBandwidthRateLimitScheduleResponse response = new GetBandwidthRateLimitScheduleResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("BandwidthRateLimitIntervals", targetDepth)) { var unmarshaller = new ListUnmarshaller<BandwidthRateLimitInterval, BandwidthRateLimitIntervalUnmarshaller>(BandwidthRateLimitIntervalUnmarshaller.Instance); response.BandwidthRateLimitIntervals = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayArn = 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("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 AmazonBackupGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetBandwidthRateLimitScheduleResponseUnmarshaller _instance = new GetBandwidthRateLimitScheduleResponseUnmarshaller(); internal static GetBandwidthRateLimitScheduleResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetBandwidthRateLimitScheduleResponseUnmarshaller Instance { get { return _instance; } } } }
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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// GetGateway Request Marshaller /// </summary> public class GetGatewayRequestMarshaller : IMarshaller<IRequest, GetGatewayRequest> , 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((GetGatewayRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetGatewayRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.GetGateway"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetGatewayArn()) { context.Writer.WritePropertyName("GatewayArn"); context.Writer.Write(publicRequest.GatewayArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static GetGatewayRequestMarshaller _instance = new GetGatewayRequestMarshaller(); internal static GetGatewayRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetGatewayRequestMarshaller Instance { get { return _instance; } } } }
103
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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetGateway operation /// </summary> public class GetGatewayResponseUnmarshaller : 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) { GetGatewayResponse response = new GetGatewayResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Gateway", targetDepth)) { var unmarshaller = GatewayDetailsUnmarshaller.Instance; response.Gateway = 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("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 AmazonBackupGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetGatewayResponseUnmarshaller _instance = new GetGatewayResponseUnmarshaller(); internal static GetGatewayResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetGatewayResponseUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// GetHypervisorPropertyMappings Request Marshaller /// </summary> public class GetHypervisorPropertyMappingsRequestMarshaller : IMarshaller<IRequest, GetHypervisorPropertyMappingsRequest> , 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((GetHypervisorPropertyMappingsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetHypervisorPropertyMappingsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.GetHypervisorPropertyMappings"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetHypervisorArn()) { context.Writer.WritePropertyName("HypervisorArn"); context.Writer.Write(publicRequest.HypervisorArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static GetHypervisorPropertyMappingsRequestMarshaller _instance = new GetHypervisorPropertyMappingsRequestMarshaller(); internal static GetHypervisorPropertyMappingsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetHypervisorPropertyMappingsRequestMarshaller Instance { get { return _instance; } } } }
103
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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetHypervisorPropertyMappings operation /// </summary> public class GetHypervisorPropertyMappingsResponseUnmarshaller : 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) { GetHypervisorPropertyMappingsResponse response = new GetHypervisorPropertyMappingsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("HypervisorArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.HypervisorArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IamRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.IamRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VmwareToAwsTagMappings", targetDepth)) { var unmarshaller = new ListUnmarshaller<VmwareToAwsTagMapping, VmwareToAwsTagMappingUnmarshaller>(VmwareToAwsTagMappingUnmarshaller.Instance); response.VmwareToAwsTagMappings = 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("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 AmazonBackupGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetHypervisorPropertyMappingsResponseUnmarshaller _instance = new GetHypervisorPropertyMappingsResponseUnmarshaller(); internal static GetHypervisorPropertyMappingsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetHypervisorPropertyMappingsResponseUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// GetHypervisor Request Marshaller /// </summary> public class GetHypervisorRequestMarshaller : IMarshaller<IRequest, GetHypervisorRequest> , 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((GetHypervisorRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetHypervisorRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.GetHypervisor"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetHypervisorArn()) { context.Writer.WritePropertyName("HypervisorArn"); context.Writer.Write(publicRequest.HypervisorArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static GetHypervisorRequestMarshaller _instance = new GetHypervisorRequestMarshaller(); internal static GetHypervisorRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetHypervisorRequestMarshaller Instance { get { return _instance; } } } }
103
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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetHypervisor operation /// </summary> public class GetHypervisorResponseUnmarshaller : 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) { GetHypervisorResponse response = new GetHypervisorResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Hypervisor", targetDepth)) { var unmarshaller = HypervisorDetailsUnmarshaller.Instance; response.Hypervisor = 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("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 AmazonBackupGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetHypervisorResponseUnmarshaller _instance = new GetHypervisorResponseUnmarshaller(); internal static GetHypervisorResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetHypervisorResponseUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// GetVirtualMachine Request Marshaller /// </summary> public class GetVirtualMachineRequestMarshaller : IMarshaller<IRequest, GetVirtualMachineRequest> , 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((GetVirtualMachineRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetVirtualMachineRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.GetVirtualMachine"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetResourceArn()) { context.Writer.WritePropertyName("ResourceArn"); context.Writer.Write(publicRequest.ResourceArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static GetVirtualMachineRequestMarshaller _instance = new GetVirtualMachineRequestMarshaller(); internal static GetVirtualMachineRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetVirtualMachineRequestMarshaller Instance { get { return _instance; } } } }
103
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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetVirtualMachine operation /// </summary> public class GetVirtualMachineResponseUnmarshaller : 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) { GetVirtualMachineResponse response = new GetVirtualMachineResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("VirtualMachine", targetDepth)) { var unmarshaller = VirtualMachineDetailsUnmarshaller.Instance; response.VirtualMachine = 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("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 AmazonBackupGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetVirtualMachineResponseUnmarshaller _instance = new GetVirtualMachineResponseUnmarshaller(); internal static GetVirtualMachineResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetVirtualMachineResponseUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for HypervisorDetails Object /// </summary> public class HypervisorDetailsUnmarshaller : IUnmarshaller<HypervisorDetails, XmlUnmarshallerContext>, IUnmarshaller<HypervisorDetails, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> HypervisorDetails IUnmarshaller<HypervisorDetails, 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 HypervisorDetails Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; HypervisorDetails unmarshalledObject = new HypervisorDetails(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Host", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Host = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HypervisorArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.HypervisorArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("KmsKeyArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsKeyArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastSuccessfulMetadataSyncTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastSuccessfulMetadataSyncTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LatestMetadataSyncStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LatestMetadataSyncStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LatestMetadataSyncStatusMessage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LatestMetadataSyncStatusMessage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LogGroupArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LogGroupArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.State = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static HypervisorDetailsUnmarshaller _instance = new HypervisorDetailsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static HypervisorDetailsUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Hypervisor Object /// </summary> public class HypervisorUnmarshaller : IUnmarshaller<Hypervisor, XmlUnmarshallerContext>, IUnmarshaller<Hypervisor, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Hypervisor IUnmarshaller<Hypervisor, 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 Hypervisor Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Hypervisor unmarshalledObject = new Hypervisor(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Host", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Host = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HypervisorArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.HypervisorArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("KmsKeyArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsKeyArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.State = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static HypervisorUnmarshaller _instance = new HypervisorUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static HypervisorUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// ImportHypervisorConfiguration Request Marshaller /// </summary> public class ImportHypervisorConfigurationRequestMarshaller : IMarshaller<IRequest, ImportHypervisorConfigurationRequest> , 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((ImportHypervisorConfigurationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ImportHypervisorConfigurationRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.ImportHypervisorConfiguration"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetHost()) { context.Writer.WritePropertyName("Host"); context.Writer.Write(publicRequest.Host); } if(publicRequest.IsSetKmsKeyArn()) { context.Writer.WritePropertyName("KmsKeyArn"); context.Writer.Write(publicRequest.KmsKeyArn); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetPassword()) { context.Writer.WritePropertyName("Password"); context.Writer.Write(publicRequest.Password); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetUsername()) { context.Writer.WritePropertyName("Username"); context.Writer.Write(publicRequest.Username); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static ImportHypervisorConfigurationRequestMarshaller _instance = new ImportHypervisorConfigurationRequestMarshaller(); internal static ImportHypervisorConfigurationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ImportHypervisorConfigurationRequestMarshaller Instance { get { return _instance; } } } }
143
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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ImportHypervisorConfiguration operation /// </summary> public class ImportHypervisorConfigurationResponseUnmarshaller : 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) { ImportHypervisorConfigurationResponse response = new ImportHypervisorConfigurationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("HypervisorArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.HypervisorArn = 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("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonBackupGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ImportHypervisorConfigurationResponseUnmarshaller _instance = new ImportHypervisorConfigurationResponseUnmarshaller(); internal static ImportHypervisorConfigurationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ImportHypervisorConfigurationResponseUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for InternalServerException Object /// </summary> public class InternalServerExceptionUnmarshaller : IErrorResponseUnmarshaller<InternalServerException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public InternalServerException 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 InternalServerException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); InternalServerException unmarshalledObject = new InternalServerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ErrorCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ErrorCode = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static InternalServerExceptionUnmarshaller _instance = new InternalServerExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static InternalServerExceptionUnmarshaller 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 backup-gateway-2021-01-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.BackupGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.BackupGateway.Model.Internal.MarshallTransformations { /// <summary> /// ListGateways Request Marshaller /// </summary> public class ListGatewaysRequestMarshaller : IMarshaller<IRequest, ListGatewaysRequest> , 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((ListGatewaysRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListGatewaysRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.BackupGateway"); string target = "BackupOnPremises_v20210101.ListGateways"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.0"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-01-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(publicRequest.NextToken); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static ListGatewaysRequestMarshaller _instance = new ListGatewaysRequestMarshaller(); internal static ListGatewaysRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListGatewaysRequestMarshaller Instance { get { return _instance; } } } }
109