/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace ACMPCA { namespace Model { /** *

Validity specifies the period of time during which a certificate is valid. * Validity can be expressed as an explicit date and time when the certificate * expires, or as a span of time after issuance, stated in days, months, or years. * For more information, see Validity in RFC * 5280.

You can issue a certificate by calling the IssueCertificate * action.

See Also:

AWS * API Reference

*/ class AWS_ACMPCA_API Validity { public: Validity(); Validity(Aws::Utils::Json::JsonView jsonValue); Validity& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

A long integer interpreted according to the value of Type, * below.

*/ inline long long GetValue() const{ return m_value; } /** *

A long integer interpreted according to the value of Type, * below.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

A long integer interpreted according to the value of Type, * below.

*/ inline void SetValue(long long value) { m_valueHasBeenSet = true; m_value = value; } /** *

A long integer interpreted according to the value of Type, * below.

*/ inline Validity& WithValue(long long value) { SetValue(value); return *this;} /** *

Determines how ACM Private CA interprets the Value * parameter, an integer. Supported validity types include those listed below. Type * definitions with values include a sample input value and the resulting output. *

END_DATE: The specific date and time when the certificate * will expire, expressed using UTCTime (YYMMDDHHMMSS) or GeneralizedTime * (YYYYMMDDHHMMSS) format. When UTCTime is used, if the year field (YY) is greater * than or equal to 50, the year is interpreted as 19YY. If the year field is less * than 50, the year is interpreted as 20YY.

  • Sample input value: * 491231235959 (UTCTime format)

  • Output expiration date/time: * 12/31/2049 23:59:59

ABSOLUTE: The specific date * and time when the certificate will expire, expressed in seconds since the Unix * Epoch.

  • Sample input value: 2524608000

  • Output * expiration date/time: 01/01/2050 00:00:00

DAYS, * MONTHS, YEARS: The relative time from the moment of * issuance until the certificate will expire, expressed in days, months, or years. *

Example if DAYS, issued on 10/12/2020 at 12:34:54 UTC:

*
  • Sample input value: 90

  • Output expiration date: * 01/10/2020 12:34:54 UTC

*/ inline const ValidityPeriodType& GetType() const{ return m_type; } /** *

Determines how ACM Private CA interprets the Value * parameter, an integer. Supported validity types include those listed below. Type * definitions with values include a sample input value and the resulting output. *

END_DATE: The specific date and time when the certificate * will expire, expressed using UTCTime (YYMMDDHHMMSS) or GeneralizedTime * (YYYYMMDDHHMMSS) format. When UTCTime is used, if the year field (YY) is greater * than or equal to 50, the year is interpreted as 19YY. If the year field is less * than 50, the year is interpreted as 20YY.

  • Sample input value: * 491231235959 (UTCTime format)

  • Output expiration date/time: * 12/31/2049 23:59:59

ABSOLUTE: The specific date * and time when the certificate will expire, expressed in seconds since the Unix * Epoch.

  • Sample input value: 2524608000

  • Output * expiration date/time: 01/01/2050 00:00:00

DAYS, * MONTHS, YEARS: The relative time from the moment of * issuance until the certificate will expire, expressed in days, months, or years. *

Example if DAYS, issued on 10/12/2020 at 12:34:54 UTC:

*
  • Sample input value: 90

  • Output expiration date: * 01/10/2020 12:34:54 UTC

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

Determines how ACM Private CA interprets the Value * parameter, an integer. Supported validity types include those listed below. Type * definitions with values include a sample input value and the resulting output. *

END_DATE: The specific date and time when the certificate * will expire, expressed using UTCTime (YYMMDDHHMMSS) or GeneralizedTime * (YYYYMMDDHHMMSS) format. When UTCTime is used, if the year field (YY) is greater * than or equal to 50, the year is interpreted as 19YY. If the year field is less * than 50, the year is interpreted as 20YY.

  • Sample input value: * 491231235959 (UTCTime format)

  • Output expiration date/time: * 12/31/2049 23:59:59

ABSOLUTE: The specific date * and time when the certificate will expire, expressed in seconds since the Unix * Epoch.

  • Sample input value: 2524608000

  • Output * expiration date/time: 01/01/2050 00:00:00

DAYS, * MONTHS, YEARS: The relative time from the moment of * issuance until the certificate will expire, expressed in days, months, or years. *

Example if DAYS, issued on 10/12/2020 at 12:34:54 UTC:

*
  • Sample input value: 90

  • Output expiration date: * 01/10/2020 12:34:54 UTC

*/ inline void SetType(const ValidityPeriodType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

Determines how ACM Private CA interprets the Value * parameter, an integer. Supported validity types include those listed below. Type * definitions with values include a sample input value and the resulting output. *

END_DATE: The specific date and time when the certificate * will expire, expressed using UTCTime (YYMMDDHHMMSS) or GeneralizedTime * (YYYYMMDDHHMMSS) format. When UTCTime is used, if the year field (YY) is greater * than or equal to 50, the year is interpreted as 19YY. If the year field is less * than 50, the year is interpreted as 20YY.

  • Sample input value: * 491231235959 (UTCTime format)

  • Output expiration date/time: * 12/31/2049 23:59:59

ABSOLUTE: The specific date * and time when the certificate will expire, expressed in seconds since the Unix * Epoch.

  • Sample input value: 2524608000

  • Output * expiration date/time: 01/01/2050 00:00:00

DAYS, * MONTHS, YEARS: The relative time from the moment of * issuance until the certificate will expire, expressed in days, months, or years. *

Example if DAYS, issued on 10/12/2020 at 12:34:54 UTC:

*
  • Sample input value: 90

  • Output expiration date: * 01/10/2020 12:34:54 UTC

*/ inline void SetType(ValidityPeriodType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

Determines how ACM Private CA interprets the Value * parameter, an integer. Supported validity types include those listed below. Type * definitions with values include a sample input value and the resulting output. *

END_DATE: The specific date and time when the certificate * will expire, expressed using UTCTime (YYMMDDHHMMSS) or GeneralizedTime * (YYYYMMDDHHMMSS) format. When UTCTime is used, if the year field (YY) is greater * than or equal to 50, the year is interpreted as 19YY. If the year field is less * than 50, the year is interpreted as 20YY.

  • Sample input value: * 491231235959 (UTCTime format)

  • Output expiration date/time: * 12/31/2049 23:59:59

ABSOLUTE: The specific date * and time when the certificate will expire, expressed in seconds since the Unix * Epoch.

  • Sample input value: 2524608000

  • Output * expiration date/time: 01/01/2050 00:00:00

DAYS, * MONTHS, YEARS: The relative time from the moment of * issuance until the certificate will expire, expressed in days, months, or years. *

Example if DAYS, issued on 10/12/2020 at 12:34:54 UTC:

*
  • Sample input value: 90

  • Output expiration date: * 01/10/2020 12:34:54 UTC

*/ inline Validity& WithType(const ValidityPeriodType& value) { SetType(value); return *this;} /** *

Determines how ACM Private CA interprets the Value * parameter, an integer. Supported validity types include those listed below. Type * definitions with values include a sample input value and the resulting output. *

END_DATE: The specific date and time when the certificate * will expire, expressed using UTCTime (YYMMDDHHMMSS) or GeneralizedTime * (YYYYMMDDHHMMSS) format. When UTCTime is used, if the year field (YY) is greater * than or equal to 50, the year is interpreted as 19YY. If the year field is less * than 50, the year is interpreted as 20YY.

  • Sample input value: * 491231235959 (UTCTime format)

  • Output expiration date/time: * 12/31/2049 23:59:59

ABSOLUTE: The specific date * and time when the certificate will expire, expressed in seconds since the Unix * Epoch.

  • Sample input value: 2524608000

  • Output * expiration date/time: 01/01/2050 00:00:00

DAYS, * MONTHS, YEARS: The relative time from the moment of * issuance until the certificate will expire, expressed in days, months, or years. *

Example if DAYS, issued on 10/12/2020 at 12:34:54 UTC:

*
  • Sample input value: 90

  • Output expiration date: * 01/10/2020 12:34:54 UTC

*/ inline Validity& WithType(ValidityPeriodType&& value) { SetType(std::move(value)); return *this;} private: long long m_value; bool m_valueHasBeenSet; ValidityPeriodType m_type; bool m_typeHasBeenSet; }; } // namespace Model } // namespace ACMPCA } // namespace Aws