///GENMHASH:78875D7320F151C84C51611FC09D4CC2:3EAA4712B5C494AD4AB8E1AA820E5A1C
        protected LoadBalancerFrontendImpl EnsureUniqueFrontend()
        {
            string name = SdkContext.RandomResourceName("frontend", 20);
            LoadBalancerFrontendImpl frontend = DefineFrontend(name);

            frontend.Attach();
            return(frontend);
        }
        ///GENMHASH:5368AC7579C6EE249C0AD6A90678BF35:DBC4E47BA426D019C948CDD4FF3805F0
        internal ILoadBalancerPublicFrontend EnsurePublicFrontendWithPip(string pipId)
        {
            var frontend = FindFrontendByPublicIPAddress(pipId);

            if (pipId == null)
            {
                return(null);
            }
            else if (frontend != null)
            {
                return(frontend);
            }
            else
            {
                // Create new frontend
                LoadBalancerFrontendImpl fe = EnsureUniqueFrontend()
                                              .WithExistingPublicIPAddress(pipId);
                fe.Attach();
                return(fe);
            }
        }
        ///GENMHASH:19F616FD24A9FEB061A4AD97B44DD095:345305550E7CF60E8C5F17B68CA0E7FE
        internal ILoadBalancerPrivateFrontend EnsurePrivateFrontendWithSubnet(string networkId, string subnetName)
        {
            var frontend = FindPrivateFrontendWithSubnet(networkId, subnetName);

            if (networkId == null || subnetName == null)
            {
                return(null);
            }
            else if (frontend != null)
            {
                return(frontend);
            }
            else
            {
                // Create new frontend
                LoadBalancerFrontendImpl fe = this.EnsureUniqueFrontend()
                                              .WithExistingSubnet(networkId, subnetName)
                                              .WithPrivateIPAddressDynamic();
                fe.Attach();
                return(fe);
            }
        }