private IPage <ResourceModel> ListResourceModel(string nextPageLink) { return(BandwidthSchedulesOperationsExtensions.ListByDataBoxEdgeDeviceNext( this.DataBoxEdgeManagementClient.BandwidthSchedules, nextPageLink )); }
private IPage <ResourceModel> ListResourceModel() { return(BandwidthSchedulesOperationsExtensions.ListByDataBoxEdgeDevice( this.DataBoxEdgeManagementClient.BandwidthSchedules, this.DeviceName, this.ResourceGroupName)); }
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))); }
private ResourceModel GetResourceModel() { return(BandwidthSchedulesOperationsExtensions.Get( this.DataBoxEdgeManagementClient.BandwidthSchedules, this.DeviceName, this.Name, this.ResourceGroupName)); }
private bool Remove() { BandwidthSchedulesOperationsExtensions.Delete( this.StackEdgeManagementClient.BandwidthSchedules, this.DeviceName, this.Name, this.ResourceGroupName); return(true); }
private PSResourceModel UpdateResourceModel() { var resourceModel = GetResourceModel(); if (this.DaysOfWeek != null && this.DaysOfWeek.Length != 0) { var days = new List <string>(this.DaysOfWeek); resourceModel.Days = days; } if (this.Bandwidth > 0) { resourceModel.RateInMbps = Bandwidth; } if (UnlimitedBandwidth) { resourceModel.RateInMbps = 0; } if (!string.IsNullOrEmpty(this.StartTime)) { resourceModel.Start = this.StartTime; } if (!string.IsNullOrEmpty(this.StartTime)) { resourceModel.Stop = this.StopTime; } return(new PSResourceModel( BandwidthSchedulesOperationsExtensions.CreateOrUpdate( this.DataBoxEdgeManagementClient.BandwidthSchedules, this.DeviceName, this.Name, resourceModel, this.ResourceGroupName))); }