4bc0f715bbb1c521e786475a69c18ac3d06f7e4a
[optf/cmso.git] /
1 /*
2  * ============LICENSE_START==============================================
3  * Copyright (c) 2019 AT&T Intellectual Property.
4  * =======================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License"); you may
6  * not use this file except in compliance with the License. You may obtain a
7  * copy of the License at
8  *
9  *        http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14  * or implied. See the License for the specific language governing
15  * permissions and limitations under the License.
16  * ============LICENSE_END=================================================
17  *
18  */
19
20 package org.onap.optf.cmso.optimizer.availability.policies.model;
21
22 import java.util.List;
23
24 /*
25
26 {
27     "day": "weekday",
28     "timeRange": [
29         {
30             "start_time": "00:00:00+00:00",
31             "end_time": "06:00:00+00:00"
32         }
33     ]
34 }
35
36  */
37 public class AllowedPeriodicTime {
38
39     public enum Day
40     {
41         weekday("RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"),
42         weekend("RRULE:FREQ=WEEKLY;BYDAY=SA,SU"),
43         ;
44         private String rrule;
45         private Day(String rrule) {this.rrule = rrule;}
46         public String getRrule() {return rrule;}
47
48     }
49
50     private Day day;
51     private List<TimeRange> timeRange;
52     public Day getDay() {
53         return day;
54     }
55     public void setDay(Day day) {
56         this.day = day;
57     }
58     public List<TimeRange> getTimeRange() {
59         return timeRange;
60     }
61     public void setTimeRange(List<TimeRange> timeRange) {
62         this.timeRange = timeRange;
63     }
64
65 }