• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

smartsheet / smartsheet-java-sdk / #55

02 Oct 2024 07:40PM UTC coverage: 60.548% (+0.7%) from 59.836%
#55

push

github

web-flow
Release prep for 3.2.1 (#103)

4156 of 6864 relevant lines covered (60.55%)

0.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

24.14
/src/main/java/com/smartsheet/api/models/ContainerDestination.java
1
/*
2
 * Copyright (C) 2024 Smartsheet
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package com.smartsheet.api.models;
18

19
import com.smartsheet.api.models.enums.DestinationType;
20

21
public class ContainerDestination {
22

23
    /**
24
     * Represents the destination type when a Sheet or Folder is moved, or when a Sheet, Folder, or Workspace is copied..
25
     */
26
    private DestinationType destinationType;
27

28
    /**
29
     * Represents the destination id when a Sheet or Folder is moved, or when a Sheet, Folder, or Workspace is copied..
30
     */
31
    private Long destinationId;
32

33
    /**
34
     * Represents the new name when a Sheet or Folder is moved, or when a Sheet, Folder, or Workspace is copied..
35
     */
36
    private String newName;
37

38
    /**
39
     * Constructors
40
     */
41
    public ContainerDestination() {
1✔
42
    }
1✔
43

44
    public ContainerDestination(Long destinationId) {
×
45
        setDestinationId(destinationId);
×
46
    }
×
47

48
    /**
49
     * Gets the destination type when copying or moving a Sheet or a Folder.
50
     *
51
     * @return the destination type
52
     */
53
    public DestinationType getDestinationType() {
54
        return destinationType;
1✔
55
    }
56

57
    /**
58
     * Sets the type for the folder
59
     *
60
     * @param destinationType the destination type
61
     */
62
    public ContainerDestination setDestinationType(DestinationType destinationType) {
63
        this.destinationType = destinationType;
1✔
64
        return this;
1✔
65
    }
66

67
    /**
68
     * Gets the destination id when copying or moving a Sheet or a Folder.
69
     *
70
     * @return the destination id
71
     */
72
    public Long getDestinationId() {
73
        return destinationId;
1✔
74
    }
75

76
    /**
77
     * Sets the id for the folder
78
     *
79
     * @param destinationId the destination id
80
     */
81
    public ContainerDestination setDestinationId(Long destinationId) {
82
        this.destinationId = destinationId;
×
83
        return this;
×
84
    }
85

86
    /**
87
     * Gets the destination name when copying or moving a Sheet or a Folder.
88
     *
89
     * @return the destination id
90
     */
91
    public String getNewName() {
92
        return newName;
1✔
93
    }
94

95
    /**
96
     * Sets the name for the destination
97
     *
98
     * @param newName the new name
99
     */
100
    public ContainerDestination setNewName(String newName) {
101
        this.newName = newName;
×
102
        return this;
×
103
    }
104

105
    /**
106
     * A convenience class to generate a comment with the appropriate fields for adding it to a sheet.
107
     */
108
    public static class AddContainerDestinationBuilder {
×
109

110
        /**
111
         * Represents the destination type when a Sheet or Folder is moved, or when a Sheet, Folder, or Workspace is copied..
112
         */
113
        private DestinationType destinationType;
114

115
        /**
116
         * Represents the destination id when a Sheet or Folder is moved, or when a Sheet, Folder, or Workspace is copied..
117
         */
118
        Long destinationId;
119

120
        /**
121
         * Represents the new name when a Sheet or Folder is moved, or when a Sheet, Folder, or Workspace is copied..
122
         */
123
        String newName;
124

125
        /**
126
         * Gets the destination type when copying or moving a Sheet or a Folder.
127
         *
128
         * @return the destination type
129
         */
130
        public DestinationType getDestinationType() {
131
            return destinationType;
×
132
        }
133

134
        /**
135
         * Sets the type for the folder
136
         *
137
         * @param destinationType the destination type
138
         * @return the builder
139
         */
140
        public AddContainerDestinationBuilder setDestinationType(DestinationType destinationType) {
141
            this.destinationType = destinationType;
×
142
            return this;
×
143
        }
144

145
        /**
146
         * Gets the destination id when copying or moving a Sheet or a Folder.
147
         *
148
         * @return the destination id
149
         */
150
        public Long getDestinationId() {
151
            return destinationId;
×
152
        }
153

154
        /**
155
         * Sets the id for the folder
156
         *
157
         * @param destinationId the destination id
158
         * @return the builder
159
         */
160
        public AddContainerDestinationBuilder setDestinationId(Long destinationId) {
161
            this.destinationId = destinationId;
×
162
            return this;
×
163
        }
164

165
        /**
166
         * Gets the destination name when copying or moving a Sheet or a Folder.
167
         *
168
         * @return the new name
169
         */
170
        public String getNewName() {
171
            return newName;
×
172
        }
173

174
        /**
175
         * Sets the name for the folder
176
         *
177
         * @param newName the new name for destination
178
         * @return the builder
179
         */
180
        public AddContainerDestinationBuilder setNewName(String newName) {
181
            this.newName = newName;
×
182
            return this;
×
183
        }
184

185
        /**
186
         * Builds the comment.
187
         *
188
         * @return the comment
189
         */
190
        public ContainerDestination build() {
191

192
            ContainerDestination destination = new ContainerDestination();
×
193
            destination.destinationId = destinationId;
×
194
            destination.destinationType = destinationType;
×
195
            destination.newName = newName;
×
196

197
            return destination;
×
198
        }
199
    }
200
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc