Example #1
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertObjectIsValid(nameof(DomainServer), DomainServer);

            await eventListener.AssertRegEx(nameof(ExternalDataServicesIp), ExternalDataServicesIp, @"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");

            await eventListener.AssertRegEx(nameof(ExternalIp), ExternalIp, @"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");

            if (HttpProxyList != null)
            {
                for (int __i = 0; __i < HttpProxyList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"HttpProxyList[{__i}]", HttpProxyList[__i]);
                }
            }
            if (HttpProxyWhitelist != null)
            {
                for (int __i = 0; __i < HttpProxyWhitelist.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"HttpProxyWhitelist[{__i}]", HttpProxyWhitelist[__i]);
                }
            }
            await eventListener.AssertRegEx(nameof(MasqueradingIp), MasqueradingIp, @"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");

            if (NameServerIpList != null)
            {
                for (int __i = 0; __i < NameServerIpList.Length; __i++)
                {
                    await eventListener.AssertRegEx($"NameServerIpList[{__i}]", NameServerIpList[__i], @"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");
                }
            }
            await eventListener.AssertObjectIsValid(nameof(SmtpServer), SmtpServer);
        }
Example #2
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertObjectIsValid(nameof(AppRule), AppRule);

            await eventListener.AssertObjectIsValid(nameof(IsolationRule), IsolationRule);

            await eventListener.AssertObjectIsValid(nameof(QuarantineRule), QuarantineRule);
        }
Example #3
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertNotNull(nameof(Address), Address);

            await eventListener.AssertObjectIsValid(nameof(Address), Address);

            await eventListener.AssertObjectIsValid(nameof(Credentials), Credentials);
        }
Example #4
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertMaximumLength(nameof(Name), Name, 64);

            await eventListener.AssertObjectIsValid(nameof(AvailabilityZoneReference), AvailabilityZoneReference);

            await eventListener.AssertObjectIsValid(nameof(ClusterReference), ClusterReference);

            await eventListener.AssertObjectIsValid(nameof(Resources), Resources);
        }
Example #5
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertRegEx(nameof(MacAddress), MacAddress, @"^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$");

            await eventListener.AssertObjectIsValid(nameof(NetworkFunctionChainReference), NetworkFunctionChainReference);

            await eventListener.AssertObjectIsValid(nameof(SubnetReference), SubnetReference);

            await eventListener.AssertRegEx(nameof(Uuid), Uuid, @"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$");
        }
Example #6
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertObjectIsValid(nameof(IpConfig), IpConfig);

            await eventListener.AssertObjectIsValid(nameof(NetworkFunctionChainReference), NetworkFunctionChainReference);

            await eventListener.AssertNotNull(nameof(SubnetType), SubnetType);

            await eventListener.AssertMaximumLength(nameof(VswitchName), VswitchName, 64);
        }
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertNotNull(nameof(Metadata), Metadata);

            await eventListener.AssertObjectIsValid(nameof(Metadata), Metadata);

            await eventListener.AssertNotNull(nameof(Spec), Spec);

            await eventListener.AssertObjectIsValid(nameof(Spec), Spec);
        }
Example #8
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertMaximumLength(nameof(Name), Name, 64);

            await eventListener.AssertObjectIsValid(nameof(OwnerReference), OwnerReference);

            await eventListener.AssertObjectIsValid(nameof(ProjectReference), ProjectReference);

            await eventListener.AssertRegEx(nameof(Uuid), Uuid, @"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$");
        }
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertObjectIsValid(nameof(ParentVmReference), ParentVmReference);

            await eventListener.AssertObjectIsValid(nameof(SourceAvailabilityZoneReference), SourceAvailabilityZoneReference);

            await eventListener.AssertObjectIsValid(nameof(SourceClusterReference), SourceClusterReference);

            await eventListener.AssertRegEx(nameof(VmRecoveryPointLocationAgnosticUuid), VmRecoveryPointLocationAgnosticUuid, @"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$");
        }
Example #10
0
 /// <summary>Validates that this object meets the validation criteria.</summary>
 /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
 /// events.</param>
 /// <returns>
 /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
 /// </returns>
 public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
 {
     if (MessageList != null)
     {
         for (int __i = 0; __i < MessageList.Length; __i++)
         {
             await eventListener.AssertObjectIsValid($"MessageList[{__i}]", MessageList[__i]);
         }
     }
     await eventListener.AssertObjectIsValid(nameof(Resources), Resources);
 }
 /// <summary>Validates that this object meets the validation criteria.</summary>
 /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
 /// events.</param>
 /// <returns>
 /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
 /// </returns>
 public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
 {
     if (CitrixVmReferenceList != null)
     {
         for (int __i = 0; __i < CitrixVmReferenceList.Length; __i++)
         {
             await eventListener.AssertObjectIsValid($"CitrixVmReferenceList[{__i}]", CitrixVmReferenceList[__i]);
         }
     }
     await eventListener.AssertObjectIsValid(nameof(ResourceLocation), ResourceLocation);
 }
Example #12
0
 /// <summary>Validates that this object meets the validation criteria.</summary>
 /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
 /// events.</param>
 /// <returns>
 /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
 /// </returns>
 public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
 {
     if (Entities != null)
     {
         for (int __i = 0; __i < Entities.Length; __i++)
         {
             await eventListener.AssertObjectIsValid($"Entities[{__i}]", Entities[__i]);
         }
     }
     await eventListener.AssertObjectIsValid(nameof(Metadata), Metadata);
 }
Example #13
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            if (CategoryList != null)
            {
                for (int __i = 0; __i < CategoryList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"CategoryList[{__i}]", CategoryList[__i]);
                }
            }
            await eventListener.AssertObjectIsValid(nameof(VmReference), VmReference);

            await eventListener.AssertObjectIsValid(nameof(VmSpec), VmSpec);
        }
Example #14
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            if (AuthorizedPublicKeyList != null)
            {
                for (int __i = 0; __i < AuthorizedPublicKeyList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"AuthorizedPublicKeyList[{__i}]", AuthorizedPublicKeyList[__i]);
                }
            }
            await eventListener.AssertObjectIsValid(nameof(Build), Build);

            if (CaCertificateList != null)
            {
                for (int __i = 0; __i < CaCertificateList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"CaCertificateList[{__i}]", CaCertificateList[__i]);
                }
            }
            await eventListener.AssertObjectIsValid(nameof(CertificationSigningInfo), CertificationSigningInfo);

            await eventListener.AssertObjectIsValid(nameof(ClientAuth), ClientAuth);

            await eventListener.AssertObjectIsValid(nameof(ExternalConfigurations), ExternalConfigurations);

            if (ManagementServerList != null)
            {
                for (int __i = 0; __i < ManagementServerList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"ManagementServerList[{__i}]", ManagementServerList[__i]);
                }
            }
            await eventListener.AssertObjectIsValid(nameof(SslKey), SslKey);
        }
Example #15
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertObjectIsValid(nameof(DataSourceReference), DataSourceReference);

            await eventListener.AssertObjectIsValid(nameof(DeviceProperties), DeviceProperties);

            await eventListener.AssertIsGreaterThanOrEqual(nameof(DiskSizeBytes), DiskSizeBytes, 1);

            await eventListener.AssertIsGreaterThanOrEqual(nameof(DiskSizeMib), DiskSizeMib, 1);

            await eventListener.AssertRegEx(nameof(Uuid), Uuid, @"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$");

            await eventListener.AssertObjectIsValid(nameof(VolumeGroupReference), VolumeGroupReference);
        }
Example #16
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertNotNull(nameof(ClusterReference), ClusterReference);

            await eventListener.AssertObjectIsValid(nameof(ClusterReference), ClusterReference);

            if (ImageReferenceList != null)
            {
                for (int __i = 0; __i < ImageReferenceList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"ImageReferenceList[{__i}]", ImageReferenceList[__i]);
                }
            }
        }
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertObjectIsValid(nameof(Analysis), Analysis);

            await eventListener.AssertNotNull(nameof(Config), Config);

            await eventListener.AssertObjectIsValid(nameof(Config), Config);

            await eventListener.AssertNotNull(nameof(Network), Network);

            await eventListener.AssertObjectIsValid(nameof(Network), Network);

            await eventListener.AssertObjectIsValid(nameof(Nodes), Nodes);
        }
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertNotNull(nameof(ExecutionPlan), ExecutionPlan);

            await eventListener.AssertNotNull(nameof(SpecList), SpecList);

            if (SpecList != null)
            {
                for (int __i = 0; __i < SpecList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"SpecList[{__i}]", SpecList[__i]);
                }
            }
            await eventListener.AssertObjectIsValid(nameof(UpgradeSchedule), UpgradeSchedule);
        }
Example #19
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertNotNull(nameof(EntitySpecList), EntitySpecList);

            if (EntitySpecList != null)
            {
                for (int __i = 0; __i < EntitySpecList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"EntitySpecList[{__i}]", EntitySpecList[__i]);
                }
            }
            await eventListener.AssertObjectIsValid(nameof(ProbableClusterReference), ProbableClusterReference);

            await eventListener.AssertRegEx(nameof(TenantUuid), TenantUuid, @"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$");
        }
Example #20
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertRegEx(nameof(DefaultGatewayIp), DefaultGatewayIp, @"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");

            await eventListener.AssertObjectIsValid(nameof(DhcpOptions), DhcpOptions);

            await eventListener.AssertObjectIsValid(nameof(DhcpServerAddress), DhcpServerAddress);

            if (PoolList != null)
            {
                for (int __i = 0; __i < PoolList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"PoolList[{__i}]", PoolList[__i]);
                }
            }
            await eventListener.AssertRegEx(nameof(SubnetIp), SubnetIp, @"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");
        }
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertMaximumLength(nameof(DefaultUserPrincipalName), DefaultUserPrincipalName, 104);

            await eventListener.AssertObjectIsValid(nameof(DirectoryServiceReference), DirectoryServiceReference);

            await eventListener.AssertMaximumLength(nameof(UserPrincipalName), UserPrincipalName, 104);
        }
 /// <summary>Validates that this object meets the validation criteria.</summary>
 /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
 /// events.</param>
 /// <returns>
 /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
 /// </returns>
 public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
 {
     if (InboundAllowList != null)
     {
         for (int __i = 0; __i < InboundAllowList.Length; __i++)
         {
             await eventListener.AssertObjectIsValid($"InboundAllowList[{__i}]", InboundAllowList[__i]);
         }
     }
     if (OutboundAllowList != null)
     {
         for (int __i = 0; __i < OutboundAllowList.Length; __i++)
         {
             await eventListener.AssertObjectIsValid($"OutboundAllowList[{__i}]", OutboundAllowList[__i]);
         }
     }
     await eventListener.AssertObjectIsValid(nameof(TargetGroup), TargetGroup);
 }
Example #23
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertNotNull(nameof(ClusterIp), ClusterIp);

            await eventListener.AssertRegEx(nameof(ClusterIp), ClusterIp, @"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");

            await eventListener.AssertNotNull(nameof(ClusterReference), ClusterReference);

            await eventListener.AssertObjectIsValid(nameof(ClusterReference), ClusterReference);
        }
Example #24
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertNotNull(nameof(Name), Name);

            await eventListener.AssertMaximumLength(nameof(Name), Name, 64);

            await eventListener.AssertNotNull(nameof(Resources), Resources);

            await eventListener.AssertObjectIsValid(nameof(Resources), Resources);
        }
Example #25
0
 /// <summary>Validates that this object meets the validation criteria.</summary>
 /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
 /// events.</param>
 /// <returns>
 /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
 /// </returns>
 public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
 {
     if (EntityAnyReferenceList != null)
     {
         for (int __i = 0; __i < EntityAnyReferenceList.Length; __i++)
         {
             await eventListener.AssertObjectIsValid($"EntityAnyReferenceList[{__i}]", EntityAnyReferenceList[__i]);
         }
     }
 }
Example #26
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertNotNull(nameof(Name), Name);

            await eventListener.AssertObjectIsValid(nameof(AvailabilityZoneReference), AvailabilityZoneReference);

            await eventListener.AssertObjectIsValid(nameof(ClusterReference), ClusterReference);

            if (MessageList != null)
            {
                for (int __i = 0; __i < MessageList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"MessageList[{__i}]", MessageList[__i]);
                }
            }
            await eventListener.AssertNotNull(nameof(Resources), Resources);

            await eventListener.AssertObjectIsValid(nameof(Resources), Resources);
        }
Example #27
0
 /// <summary>Validates that this object meets the validation criteria.</summary>
 /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
 /// events.</param>
 /// <returns>
 /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
 /// </returns>
 public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
 {
     if (HypervisorServerList != null)
     {
         for (int __i = 0; __i < HypervisorServerList.Length; __i++)
         {
             await eventListener.AssertObjectIsValid($"HypervisorServerList[{__i}]", HypervisorServerList[__i]);
         }
     }
 }
Example #28
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            if (AccessControlPolicyReferenceList != null)
            {
                for (int __i = 0; __i < AccessControlPolicyReferenceList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"AccessControlPolicyReferenceList[{__i}]", AccessControlPolicyReferenceList[__i]);
                }
            }
            await eventListener.AssertObjectIsValid(nameof(DirectoryServiceUser), DirectoryServiceUser);

            if (ProjectsReferenceList != null)
            {
                for (int __i = 0; __i < ProjectsReferenceList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"ProjectsReferenceList[{__i}]", ProjectsReferenceList[__i]);
                }
            }
            await eventListener.AssertObjectIsValid(nameof(ResourceUsageSummary), ResourceUsageSummary);
        }
Example #29
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertNotNull(nameof(Resources), Resources);

            if (Resources != null)
            {
                for (int __i = 0; __i < Resources.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"Resources[{__i}]", Resources[__i]);
                }
            }
        }
Example #30
0
        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Microsoft.Rest.ClientRuntime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref="System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async System.Threading.Tasks.Task Validate(Microsoft.Rest.ClientRuntime.IEventListener eventListener)
        {
            await eventListener.AssertObjectIsValid(nameof(BootConfig), BootConfig);

            if (DiskList != null)
            {
                for (int __i = 0; __i < DiskList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"DiskList[{__i}]", DiskList[__i]);
                }
            }
            if (GpuList != null)
            {
                for (int __i = 0; __i < GpuList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"GpuList[{__i}]", GpuList[__i]);
                }
            }
            await eventListener.AssertObjectIsValid(nameof(GuestCustomization), GuestCustomization);

            await eventListener.AssertMaximumLength(nameof(GuestOsId), GuestOsId, 64);

            await eventListener.AssertObjectIsValid(nameof(GuestTools), GuestTools);

            await eventListener.AssertMaximumLength(nameof(HardwareClockTimezone), HardwareClockTimezone, 64);

            await eventListener.AssertIsGreaterThanOrEqual(nameof(MemorySizeMib), MemorySizeMib, 1);

            if (NicList != null)
            {
                for (int __i = 0; __i < NicList.Length; __i++)
                {
                    await eventListener.AssertObjectIsValid($"NicList[{__i}]", NicList[__i]);
                }
            }
            await eventListener.AssertIsGreaterThanOrEqual(nameof(NumSockets), NumSockets, 1);

            await eventListener.AssertIsGreaterThanOrEqual(nameof(NumVcpusPerSocket), NumVcpusPerSocket, 1);

            await eventListener.AssertObjectIsValid(nameof(ParentReference), ParentReference);

            await eventListener.AssertObjectIsValid(nameof(PowerStateMechanism), PowerStateMechanism);

            await eventListener.AssertObjectIsValid(nameof(VnumaConfig), VnumaConfig);
        }