private PSResourceModel CreateResourceModel()
        {
            if (this.IsParameterBound(c => c.UnlimitedBandwidth))
            {
                Bandwidth = UnlimitedBandwidth ? 0 : 20;
            }


            var days          = new List <string>(this.DaysOfWeek);
            var resourceModel = new ResourceModel(
                this.StartTime,
                this.StopTime,
                Bandwidth,
                days,
                null,
                this.Name
                );

            return(new PSResourceModel(
                       BandwidthSchedulesOperationsExtensions.CreateOrUpdate(
                           this.DataBoxEdgeManagementClient.BandwidthSchedules,
                           this.DeviceName,
                           this.Name,
                           resourceModel,
                           this.ResourceGroupName)));
        }
        public PSDataBoxEdgeBandWidthSchedule(BandwidthSchedule bandwidthSchedule)
        {
            this.BandwidthSchedule = bandwidthSchedule ?? throw new ArgumentNullException("bandwidthSchedule");
            this.Id = bandwidthSchedule.Id;
            var resourceIdentifier = new DataBoxEdgeResourceIdentifier(bandwidthSchedule.Id);

            this.ResourceGroupName = resourceIdentifier.ResourceGroupName;
            this.DeviceName        = resourceIdentifier.DeviceName;
            this.Name = resourceIdentifier.ResourceName;
        }
 public PSDataBoxEdgeBandWidthSchedule()
 {
     BandwidthSchedule = new BandwidthSchedule();
 }