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

smartsheet / smartsheet-java-sdk / #43

24 Aug 2023 10:26PM UTC coverage: 50.427% (-0.02%) from 50.442%
#43

push

github-actions

web-flow
Fix Checkstyle violations in api/models Classes (#57)

This will fix ~900 violations

189 of 189 new or added lines in 59 files covered. (100.0%)

3423 of 6788 relevant lines covered (50.43%)

0.5 hits per line

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

0.0
/src/main/java/com/smartsheet/api/models/AlternateEmail.java
1
package com.smartsheet.api.models;
2

3
/*
4
 * #[license]
5
 * Smartsheet SDK for Java
6
 * %%
7
 * Copyright (C) 2023 Smartsheet
8
 * %%
9
 * Licensed under the Apache License, Version 2.0 (the "License");
10
 * you may not use this file except in compliance with the License.
11
 * You may obtain a copy of the License at
12
 *
13
 *      http://www.apache.org/licenses/LICENSE-2.0
14
 *
15
 * Unless required by applicable law or agreed to in writing, software
16
 * distributed under the License is distributed on an "AS IS" BASIS,
17
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
 * See the License for the specific language governing permissions and
19
 * limitations under the License.
20
 * %[license]
21
 */
22

23
/**
24
 * The AlternateEmail object (see: http://smartsheet-platform.github.io/api-docs/?shell#alternateemail-object)
25
 */
26
public class AlternateEmail {
×
27

28
    /**
29
     * The alternate email id
30
     */
31
    private Long id;
32

33
    /**
34
     * Get the alternate email id.
35
     *
36
     * @return the alternate email id
37
     */
38
    public Long getId() {
39
        return id;
×
40
    }
41

42
    /**
43
     * The user's alternate email address (user@example.com)
44
     */
45
    private String email;
46

47
    /**
48
     * Get the user's alternate email address.
49
     *
50
     * @return String containing the alternate email address
51
     */
52
    public String getEmail() {
53
        return email;
×
54
    }
55

56
    /**
57
     * Set the user's alternate email address.
58
     * @param email the  email
59
     */
60
    public AlternateEmail setEmail(String email) {
61
        this.email = email;
×
62
        return this;
×
63
    }
64

65
    /**
66
     * Flag indicating whether the alternate email address has been confirmed
67
     */
68
    private Boolean confirmed;
69

70
    /**
71
     * Get flag indicating whether the alternate email address is confirmed.
72
     *
73
     * @return true if the alternate email address has been confirmed
74
     */
75
    public Boolean getConfirmed() {
76
        return confirmed;
×
77
    }
78

79
    /**
80
     * A convenience class for making a {@link AlternateEmail} object with the appropriate fields for adding to a {@link User}.
81
     */
82
    public static class AddAlternateEmailBuilder {
×
83
        private String email;
84

85
        /**
86
         * Get the alt email address
87
         * @return the email
88
         */
89
        public String getEmail() {
90
            return email;
×
91
        }
92

93
        /**
94
         * Set the alt email address
95
         * @param email the email
96
         * @return the builder
97
         */
98
        public AddAlternateEmailBuilder setEmail(String email) {
99
            this.email = email;
×
100
            return this;
×
101
        }
102

103
        /**
104
         * Build
105
         */
106
        public AlternateEmail build() {
107
            if (email == null) {
×
108
                throw new InstantiationError("An email address must be set.");
×
109
            }
110

111
            AlternateEmail altEmail = new AlternateEmail();
×
112
            altEmail.setEmail(email);
×
113
            return altEmail;
×
114
        }
115
    }
116

117
}
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

© 2026 Coveralls, Inc