/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.EC2.Model { /// /// Container for the parameters to the RunInstances operation. /// Launches the specified number of instances using an AMI for which you have permissions. /// /// /// /// You can specify a number of options, or leave the default options. The following rules /// apply: /// /// /// /// You can create a launch /// template, which is a resource that contains the parameters to launch an instance. /// When you launch an instance using RunInstances, you can specify the launch /// template instead of specifying the launch parameters. /// /// /// /// To ensure faster instance launches, break up large requests into smaller batches. /// For example, create five separate launch requests for 100 instances each instead of /// one launch request for 500 instances. /// /// /// /// An instance is ready for you to use when it's in the running state. You /// can check the state of your instance using DescribeInstances. You can tag instances /// and EBS volumes during launch, after launch, or both. For more information, see CreateTags /// and Tagging /// your Amazon EC2 resources. /// /// /// /// Linux instances have access to the public key of the key pair at boot. You can use /// this key to provide secure access to the instance. Amazon EC2 public images use this /// feature to provide secure access without passwords. For more information, see Key /// pairs. /// /// /// /// For troubleshooting, see What /// to do if an instance immediately terminates, and Troubleshooting /// connecting to your instance. /// /// public partial class RunInstancesRequest : AmazonEC2Request { private string _additionalInfo; private List _blockDeviceMappings = new List(); private CapacityReservationSpecification _capacityReservationSpecification; private string _clientToken; private CpuOptionsRequest _cpuOptions; private CreditSpecificationRequest _creditSpecification; private bool? _disableApiStop; private bool? _disableApiTermination; private bool? _ebsOptimized; private List _elasticGpuSpecification = new List(); private List _elasticInferenceAccelerators = new List(); private EnclaveOptionsRequest _enclaveOptions; private HibernationOptionsRequest _hibernationOptions; private IamInstanceProfileSpecification _iamInstanceProfile; private string _imageId; private ShutdownBehavior _instanceInitiatedShutdownBehavior; private InstanceMarketOptionsRequest _instanceMarketOptions; private InstanceType _instanceType; private int? _ipv6AddressCount; private List _ipv6Addresses = new List(); private string _kernelId; private string _keyName; private LaunchTemplateSpecification _launchTemplate; private List _licenseSpecifications = new List(); private InstanceMaintenanceOptionsRequest _maintenanceOptions; private int? _maxCount; private InstanceMetadataOptionsRequest _metadataOptions; private int? _minCount; private bool? _monitoring; private List _networkInterfaces = new List(); private Placement _placement; private PrivateDnsNameOptionsRequest _privateDnsNameOptions; private string _privateIpAddress; private string _ramdiskId; private List _securityGroupIds = new List(); private List _securityGroups = new List(); private string _subnetId; private List _tagSpecifications = new List(); private string _userData; /// /// Empty constructor used to set properties independently even when a simple constructor is available /// public RunInstancesRequest() { } /// /// Instantiates RunInstancesRequest with the parameterized properties /// /// The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template. /// The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances. Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ. /// The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount. Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ. public RunInstancesRequest(string imageId, int minCount, int maxCount) { _imageId = imageId; _minCount = minCount; _maxCount = maxCount; } /// /// Gets and sets the property AdditionalInfo. /// /// Reserved. /// /// public string AdditionalInfo { get { return this._additionalInfo; } set { this._additionalInfo = value; } } // Check to see if AdditionalInfo property is set internal bool IsSetAdditionalInfo() { return this._additionalInfo != null; } /// /// Gets and sets the property BlockDeviceMappings. /// /// The block device mapping, which defines the EBS volumes and instance store volumes /// to attach to the instance at launch. For more information, see Block /// device mappings in the Amazon EC2 User Guide. /// /// public List BlockDeviceMappings { get { return this._blockDeviceMappings; } set { this._blockDeviceMappings = value; } } // Check to see if BlockDeviceMappings property is set internal bool IsSetBlockDeviceMappings() { return this._blockDeviceMappings != null && this._blockDeviceMappings.Count > 0; } /// /// Gets and sets the property CapacityReservationSpecification. /// /// Information about the Capacity Reservation targeting option. If you do not specify /// this parameter, the instance's Capacity Reservation preference defaults to open, /// which enables it to run in any open Capacity Reservation that has matching attributes /// (instance type, platform, Availability Zone). /// /// public CapacityReservationSpecification CapacityReservationSpecification { get { return this._capacityReservationSpecification; } set { this._capacityReservationSpecification = value; } } // Check to see if CapacityReservationSpecification property is set internal bool IsSetCapacityReservationSpecification() { return this._capacityReservationSpecification != null; } /// /// Gets and sets the property ClientToken. /// /// Unique, case-sensitive identifier you provide to ensure the idempotency of the request. /// If you do not specify a client token, a randomly generated token is used for the request /// to ensure idempotency. /// /// /// /// For more information, see Ensuring /// Idempotency. /// /// /// /// Constraints: Maximum 64 ASCII characters /// /// public string ClientToken { get { return this._clientToken; } set { this._clientToken = value; } } // Check to see if ClientToken property is set internal bool IsSetClientToken() { return this._clientToken != null; } /// /// Gets and sets the property CpuOptions. /// /// The CPU options for the instance. For more information, see Optimize /// CPU options in the Amazon EC2 User Guide. /// /// public CpuOptionsRequest CpuOptions { get { return this._cpuOptions; } set { this._cpuOptions = value; } } // Check to see if CpuOptions property is set internal bool IsSetCpuOptions() { return this._cpuOptions != null; } /// /// Gets and sets the property CreditSpecification. /// /// The credit option for CPU usage of the burstable performance instance. Valid values /// are standard and unlimited. To change this attribute after /// launch, use /// ModifyInstanceCreditSpecification. For more information, see Burstable /// performance instances in the Amazon EC2 User Guide. /// /// /// /// Default: standard (T2 instances) or unlimited (T3/T3a/T4g /// instances) /// /// /// /// For T3 instances with host tenancy, only standard is supported. /// /// public CreditSpecificationRequest CreditSpecification { get { return this._creditSpecification; } set { this._creditSpecification = value; } } // Check to see if CreditSpecification property is set internal bool IsSetCreditSpecification() { return this._creditSpecification != null; } /// /// Gets and sets the property DisableApiStop. /// /// Indicates whether an instance is enabled for stop protection. For more information, /// see Stop /// protection. /// /// public bool DisableApiStop { get { return this._disableApiStop.GetValueOrDefault(); } set { this._disableApiStop = value; } } // Check to see if DisableApiStop property is set internal bool IsSetDisableApiStop() { return this._disableApiStop.HasValue; } /// /// Gets and sets the property DisableApiTermination. /// /// If you set this parameter to true, you can't terminate the instance using /// the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute /// after launch, use ModifyInstanceAttribute. /// Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, /// you can terminate the instance by running the shutdown command from the instance. /// /// /// /// Default: false /// /// public bool DisableApiTermination { get { return this._disableApiTermination.GetValueOrDefault(); } set { this._disableApiTermination = value; } } // Check to see if DisableApiTermination property is set internal bool IsSetDisableApiTermination() { return this._disableApiTermination.HasValue; } /// /// Gets and sets the property EbsOptimized. /// /// Indicates whether the instance is optimized for Amazon EBS I/O. This optimization /// provides dedicated throughput to Amazon EBS and an optimized configuration stack to /// provide optimal Amazon EBS I/O performance. This optimization isn't available with /// all instance types. Additional usage charges apply when using an EBS-optimized instance. /// /// /// /// Default: false /// /// public bool EbsOptimized { get { return this._ebsOptimized.GetValueOrDefault(); } set { this._ebsOptimized = value; } } // Check to see if EbsOptimized property is set internal bool IsSetEbsOptimized() { return this._ebsOptimized.HasValue; } /// /// Gets and sets the property ElasticGpuSpecification. /// /// An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that /// you can attach to your Windows instance to accelerate the graphics performance of /// your applications. For more information, see Amazon /// EC2 Elastic GPUs in the Amazon EC2 User Guide. /// /// public List ElasticGpuSpecification { get { return this._elasticGpuSpecification; } set { this._elasticGpuSpecification = value; } } // Check to see if ElasticGpuSpecification property is set internal bool IsSetElasticGpuSpecification() { return this._elasticGpuSpecification != null && this._elasticGpuSpecification.Count > 0; } /// /// Gets and sets the property ElasticInferenceAccelerators. /// /// An elastic inference accelerator to associate with the instance. Elastic inference /// accelerators are a resource you can attach to your Amazon EC2 instances to accelerate /// your Deep Learning (DL) inference workloads. /// /// /// /// You cannot specify accelerators from different generations in the same request. /// /// /// /// Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon /// Elastic Inference (EI), and will help current customers migrate their workloads to /// options that offer better price and performance. After April 15, 2023, new customers /// will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, /// Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once /// during the past 30-day period are considered current customers and will be able to /// continue using the service. /// /// /// public List ElasticInferenceAccelerators { get { return this._elasticInferenceAccelerators; } set { this._elasticInferenceAccelerators = value; } } // Check to see if ElasticInferenceAccelerators property is set internal bool IsSetElasticInferenceAccelerators() { return this._elasticInferenceAccelerators != null && this._elasticInferenceAccelerators.Count > 0; } /// /// Gets and sets the property EnclaveOptions. /// /// Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. /// For more information, see What /// is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves /// User Guide. /// /// /// /// You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance. /// /// public EnclaveOptionsRequest EnclaveOptions { get { return this._enclaveOptions; } set { this._enclaveOptions = value; } } // Check to see if EnclaveOptions property is set internal bool IsSetEnclaveOptions() { return this._enclaveOptions != null; } /// /// Gets and sets the property HibernationOptions. /// /// Indicates whether an instance is enabled for hibernation. This parameter is valid /// only if the instance meets the hibernation /// prerequisites. For more information, see Hibernate /// your instance in the Amazon EC2 User Guide. /// /// /// /// You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same instance. /// /// public HibernationOptionsRequest HibernationOptions { get { return this._hibernationOptions; } set { this._hibernationOptions = value; } } // Check to see if HibernationOptions property is set internal bool IsSetHibernationOptions() { return this._hibernationOptions != null; } /// /// Gets and sets the property IamInstanceProfile. /// /// The name or Amazon Resource Name (ARN) of an IAM instance profile. /// /// public IamInstanceProfileSpecification IamInstanceProfile { get { return this._iamInstanceProfile; } set { this._iamInstanceProfile = value; } } // Check to see if IamInstanceProfile property is set internal bool IsSetIamInstanceProfile() { return this._iamInstanceProfile != null; } /// /// Gets and sets the property ImageId. /// /// The ID of the AMI. An AMI ID is required to launch an instance and must be specified /// here or in a launch template. /// /// public string ImageId { get { return this._imageId; } set { this._imageId = value; } } // Check to see if ImageId property is set internal bool IsSetImageId() { return this._imageId != null; } /// /// Gets and sets the property InstanceInitiatedShutdownBehavior. /// /// Indicates whether an instance stops or terminates when you initiate shutdown from /// the instance (using the operating system command for system shutdown). /// /// /// /// Default: stop /// /// public ShutdownBehavior InstanceInitiatedShutdownBehavior { get { return this._instanceInitiatedShutdownBehavior; } set { this._instanceInitiatedShutdownBehavior = value; } } // Check to see if InstanceInitiatedShutdownBehavior property is set internal bool IsSetInstanceInitiatedShutdownBehavior() { return this._instanceInitiatedShutdownBehavior != null; } /// /// Gets and sets the property InstanceMarketOptions. /// /// The market (purchasing) option for the instances. /// /// /// /// For RunInstances, persistent Spot Instance requests are only supported when /// InstanceInterruptionBehavior is set to either hibernate or stop. /// /// public InstanceMarketOptionsRequest InstanceMarketOptions { get { return this._instanceMarketOptions; } set { this._instanceMarketOptions = value; } } // Check to see if InstanceMarketOptions property is set internal bool IsSetInstanceMarketOptions() { return this._instanceMarketOptions != null; } /// /// Gets and sets the property InstanceType. /// /// The instance type. For more information, see Instance /// types in the Amazon EC2 User Guide. /// /// public InstanceType InstanceType { get { return this._instanceType; } set { this._instanceType = value; } } // Check to see if InstanceType property is set internal bool IsSetInstanceType() { return this._instanceType != null; } /// /// Gets and sets the property Ipv6AddressCount. /// /// The number of IPv6 addresses to associate with the primary network interface. Amazon /// EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this /// option and the option to assign specific IPv6 addresses in the same request. You can /// specify this option if you've specified a minimum number of instances to launch. /// /// /// /// You cannot specify this option and the network interfaces option in the same request. /// /// public int Ipv6AddressCount { get { return this._ipv6AddressCount.GetValueOrDefault(); } set { this._ipv6AddressCount = value; } } // Check to see if Ipv6AddressCount property is set internal bool IsSetIpv6AddressCount() { return this._ipv6AddressCount.HasValue; } /// /// Gets and sets the property Ipv6Addresses. /// /// The IPv6 addresses from the range of the subnet to associate with the primary network /// interface. You cannot specify this option and the option to assign a number of IPv6 /// addresses in the same request. You cannot specify this option if you've specified /// a minimum number of instances to launch. /// /// /// /// You cannot specify this option and the network interfaces option in the same request. /// /// public List Ipv6Addresses { get { return this._ipv6Addresses; } set { this._ipv6Addresses = value; } } // Check to see if Ipv6Addresses property is set internal bool IsSetIpv6Addresses() { return this._ipv6Addresses != null && this._ipv6Addresses.Count > 0; } /// /// Gets and sets the property KernelId. /// /// The ID of the kernel. /// /// /// /// We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, /// see PV-GRUB /// in the Amazon EC2 User Guide. /// /// /// public string KernelId { get { return this._kernelId; } set { this._kernelId = value; } } // Check to see if KernelId property is set internal bool IsSetKernelId() { return this._kernelId != null; } /// /// Gets and sets the property KeyName. /// /// The name of the key pair. You can create a key pair using CreateKeyPair /// or ImportKeyPair. /// /// /// /// If you do not specify a key pair, you can't connect to the instance unless you choose /// an AMI that is configured to allow users another way to log in. /// /// /// public string KeyName { get { return this._keyName; } set { this._keyName = value; } } // Check to see if KeyName property is set internal bool IsSetKeyName() { return this._keyName != null; } /// /// Gets and sets the property LaunchTemplate. /// /// The launch template to use to launch the instances. Any parameters that you specify /// in RunInstances override the same parameters in the launch template. You can /// specify either the name or ID of a launch template, but not both. /// /// public LaunchTemplateSpecification LaunchTemplate { get { return this._launchTemplate; } set { this._launchTemplate = value; } } // Check to see if LaunchTemplate property is set internal bool IsSetLaunchTemplate() { return this._launchTemplate != null; } /// /// Gets and sets the property LicenseSpecifications. /// /// The license configurations. /// /// public List LicenseSpecifications { get { return this._licenseSpecifications; } set { this._licenseSpecifications = value; } } // Check to see if LicenseSpecifications property is set internal bool IsSetLicenseSpecifications() { return this._licenseSpecifications != null && this._licenseSpecifications.Count > 0; } /// /// Gets and sets the property MaintenanceOptions. /// /// The maintenance and recovery options for the instance. /// /// public InstanceMaintenanceOptionsRequest MaintenanceOptions { get { return this._maintenanceOptions; } set { this._maintenanceOptions = value; } } // Check to see if MaintenanceOptions property is set internal bool IsSetMaintenanceOptions() { return this._maintenanceOptions != null; } /// /// Gets and sets the property MaxCount. /// /// The maximum number of instances to launch. If you specify more instances than Amazon /// EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible /// number of instances above MinCount. /// /// /// /// Constraints: Between 1 and the maximum number you're allowed for the specified instance /// type. For more information about the default limits, and how to request an increase, /// see How /// many instances can I run in Amazon EC2 in the Amazon EC2 FAQ. /// /// [AWSProperty(Required=true)] public int MaxCount { get { return this._maxCount.GetValueOrDefault(); } set { this._maxCount = value; } } // Check to see if MaxCount property is set internal bool IsSetMaxCount() { return this._maxCount.HasValue; } /// /// Gets and sets the property MetadataOptions. /// /// The metadata options for the instance. For more information, see Instance /// metadata and user data. /// /// public InstanceMetadataOptionsRequest MetadataOptions { get { return this._metadataOptions; } set { this._metadataOptions = value; } } // Check to see if MetadataOptions property is set internal bool IsSetMetadataOptions() { return this._metadataOptions != null; } /// /// Gets and sets the property MinCount. /// /// The minimum number of instances to launch. If you specify a minimum that is more instances /// than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no /// instances. /// /// /// /// Constraints: Between 1 and the maximum number you're allowed for the specified instance /// type. For more information about the default limits, and how to request an increase, /// see How /// many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ. /// /// [AWSProperty(Required=true)] public int MinCount { get { return this._minCount.GetValueOrDefault(); } set { this._minCount = value; } } // Check to see if MinCount property is set internal bool IsSetMinCount() { return this._minCount.HasValue; } /// /// Gets and sets the property Monitoring. /// /// Specifies whether detailed monitoring is enabled for the instance. /// /// public bool Monitoring { get { return this._monitoring.GetValueOrDefault(); } set { this._monitoring = value; } } // Check to see if Monitoring property is set internal bool IsSetMonitoring() { return this._monitoring.HasValue; } /// /// Gets and sets the property NetworkInterfaces. /// /// The network interfaces to associate with the instance. If you specify a network interface, /// you must specify any security groups and subnets as part of the network interface. /// /// public List NetworkInterfaces { get { return this._networkInterfaces; } set { this._networkInterfaces = value; } } // Check to see if NetworkInterfaces property is set internal bool IsSetNetworkInterfaces() { return this._networkInterfaces != null && this._networkInterfaces.Count > 0; } /// /// Gets and sets the property Placement. /// /// The placement for the instance. /// /// public Placement Placement { get { return this._placement; } set { this._placement = value; } } // Check to see if Placement property is set internal bool IsSetPlacement() { return this._placement != null; } /// /// Gets and sets the property PrivateDnsNameOptions. /// /// The options for the instance hostname. The default values are inherited from the subnet. /// Applies only if creating a network interface, not attaching an existing one. /// /// public PrivateDnsNameOptionsRequest PrivateDnsNameOptions { get { return this._privateDnsNameOptions; } set { this._privateDnsNameOptions = value; } } // Check to see if PrivateDnsNameOptions property is set internal bool IsSetPrivateDnsNameOptions() { return this._privateDnsNameOptions != null; } /// /// Gets and sets the property PrivateIpAddress. /// /// The primary IPv4 address. You must specify a value from the IPv4 address range of /// the subnet. /// /// /// /// Only one private IP address can be designated as primary. You can't specify this option /// if you've specified the option to designate a private IP address as the primary IP /// address in a network interface specification. You cannot specify this option if you're /// launching more than one instance in the request. /// /// /// /// You cannot specify this option and the network interfaces option in the same request. /// /// public string PrivateIpAddress { get { return this._privateIpAddress; } set { this._privateIpAddress = value; } } // Check to see if PrivateIpAddress property is set internal bool IsSetPrivateIpAddress() { return this._privateIpAddress != null; } /// /// Gets and sets the property RamdiskId. /// /// The ID of the RAM disk to select. Some kernels require additional drivers at launch. /// Check the kernel requirements for information about whether you need to specify a /// RAM disk. To find kernel requirements, go to the Amazon Web Services Resource Center /// and search for the kernel ID. /// /// /// /// We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, /// see PV-GRUB /// in the Amazon EC2 User Guide. /// /// /// public string RamdiskId { get { return this._ramdiskId; } set { this._ramdiskId = value; } } // Check to see if RamdiskId property is set internal bool IsSetRamdiskId() { return this._ramdiskId != null; } /// /// Gets and sets the property SecurityGroupIds. /// /// The IDs of the security groups. You can create a security group using CreateSecurityGroup. /// /// /// /// If you specify a network interface, you must specify any security groups as part of /// the network interface. /// /// public List SecurityGroupIds { get { return this._securityGroupIds; } set { this._securityGroupIds = value; } } // Check to see if SecurityGroupIds property is set internal bool IsSetSecurityGroupIds() { return this._securityGroupIds != null && this._securityGroupIds.Count > 0; } /// /// Gets and sets the property SecurityGroups. /// /// [Default VPC] The names of the security groups. /// /// /// /// If you specify a network interface, you must specify any security groups as part of /// the network interface. /// /// /// /// Default: Amazon EC2 uses the default security group. /// /// public List SecurityGroups { get { return this._securityGroups; } set { this._securityGroups = value; } } // Check to see if SecurityGroups property is set internal bool IsSetSecurityGroups() { return this._securityGroups != null && this._securityGroups.Count > 0; } /// /// Gets and sets the property SubnetId. /// /// The ID of the subnet to launch the instance into. /// /// /// /// If you specify a network interface, you must specify any subnets as part of the network /// interface. /// /// public string SubnetId { get { return this._subnetId; } set { this._subnetId = value; } } // Check to see if SubnetId property is set internal bool IsSetSubnetId() { return this._subnetId != null; } /// /// Gets and sets the property TagSpecifications. /// /// The tags to apply to the resources that are created during instance launch. /// /// /// /// You can specify tags for the following resources only: /// ///
  • /// /// Instances /// ///
  • /// /// Volumes /// ///
  • /// /// Elastic graphics /// ///
  • /// /// Spot Instance requests /// ///
  • /// /// Network interfaces /// ///
/// /// To tag a resource after it has been created, see CreateTags. /// ///
public List TagSpecifications { get { return this._tagSpecifications; } set { this._tagSpecifications = value; } } // Check to see if TagSpecifications property is set internal bool IsSetTagSpecifications() { return this._tagSpecifications != null && this._tagSpecifications.Count > 0; } /// /// Gets and sets the property UserData. /// /// The user data script to make available to the instance. For more information, see /// Run commands /// on your Linux instance at launch and Run /// commands on your Windows instance at launch. If you are using a command line tool, /// base64-encoding is performed for you, and you can load the text from a file. Otherwise, /// you must provide base64-encoded text. User data is limited to 16 KB. /// /// [AWSProperty(Sensitive=true)] public string UserData { get { return this._userData; } set { this._userData = value; } } // Check to see if UserData property is set internal bool IsSetUserData() { return this._userData != null; } } }