1 | /*!
|
2 | * Copyright 2016 Amazon.com,
|
3 | * Inc. or its affiliates. All Rights Reserved.
|
4 | *
|
5 | * Licensed under the Amazon Software License (the "License").
|
6 | * You may not use this file except in compliance with the
|
7 | * License. A copy of the License is located at
|
8 | *
|
9 | * http://aws.amazon.com/asl/
|
10 | *
|
11 | * or in the "license" file accompanying this file. This file is
|
12 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
13 | * CONDITIONS OF ANY KIND, express or implied. See the License
|
14 | * for the specific language governing permissions and
|
15 | * limitations under the License.
|
16 | */
|
17 |
|
18 | /** @class */
|
19 | var CognitoUserAttribute = /*#__PURE__*/function () {
|
20 | /**
|
21 | * Constructs a new CognitoUserAttribute object
|
22 | * @param {string=} Name The record's name
|
23 | * @param {string=} Value The record's value
|
24 | */
|
25 | function CognitoUserAttribute(_temp) {
|
26 | var _ref = _temp === void 0 ? {} : _temp,
|
27 | Name = _ref.Name,
|
28 | Value = _ref.Value;
|
29 |
|
30 | this.Name = Name || '';
|
31 | this.Value = Value || '';
|
32 | }
|
33 | /**
|
34 | * @returns {string} the record's value.
|
35 | */
|
36 |
|
37 |
|
38 | var _proto = CognitoUserAttribute.prototype;
|
39 |
|
40 | _proto.getValue = function getValue() {
|
41 | return this.Value;
|
42 | }
|
43 | /**
|
44 | * Sets the record's value.
|
45 | * @param {string} value The new value.
|
46 | * @returns {CognitoUserAttribute} The record for method chaining.
|
47 | */
|
48 | ;
|
49 |
|
50 | _proto.setValue = function setValue(value) {
|
51 | this.Value = value;
|
52 | return this;
|
53 | }
|
54 | /**
|
55 | * @returns {string} the record's name.
|
56 | */
|
57 | ;
|
58 |
|
59 | _proto.getName = function getName() {
|
60 | return this.Name;
|
61 | }
|
62 | /**
|
63 | * Sets the record's name
|
64 | * @param {string} name The new name.
|
65 | * @returns {CognitoUserAttribute} The record for method chaining.
|
66 | */
|
67 | ;
|
68 |
|
69 | _proto.setName = function setName(name) {
|
70 | this.Name = name;
|
71 | return this;
|
72 | }
|
73 | /**
|
74 | * @returns {string} a string representation of the record.
|
75 | */
|
76 | ;
|
77 |
|
78 | _proto.toString = function toString() {
|
79 | return JSON.stringify(this);
|
80 | }
|
81 | /**
|
82 | * @returns {object} a flat object representing the record.
|
83 | */
|
84 | ;
|
85 |
|
86 | _proto.toJSON = function toJSON() {
|
87 | return {
|
88 | Name: this.Name,
|
89 | Value: this.Value
|
90 | };
|
91 | };
|
92 |
|
93 | return CognitoUserAttribute;
|
94 | }();
|
95 |
|
96 | export { CognitoUserAttribute as default }; |
\ | No newline at end of file |