• 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

40.0
/src/main/java/com/smartsheet/api/models/AlternateEmail.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
/**
20
 * The AlternateEmail object, retruned by endpoints like
21
 * the <a href="https://smartsheet.redoc.ly/tag/alternateEmailAddress#operation/get-alternate-email">Get Alternate Email endpoint</a>
22
 */
23
public class AlternateEmail {
1✔
24

25
    /**
26
     * The alternate email id
27
     */
28
    private Long id;
29

30
    /**
31
     * Get the alternate email id.
32
     *
33
     * @return the alternate email id
34
     */
35
    public Long getId() {
36
        return id;
1✔
37
    }
38

39
    /**
40
     * The user's alternate email address (user@example.com)
41
     */
42
    private String email;
43

44
    /**
45
     * Get the user's alternate email address.
46
     *
47
     * @return String containing the alternate email address
48
     */
49
    public String getEmail() {
50
        return email;
1✔
51
    }
52

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

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

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

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

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

92
        /**
93
         * Set the alt email address
94
         *
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

© 2025 Coveralls, Inc