/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace IoTSiteWise
{
namespace Model
{
/**
* Contains a timestamp with optional nanosecond granularity.
See
* Also:
AWS
* API Reference
*/
class TimeInNanos
{
public:
AWS_IOTSITEWISE_API TimeInNanos();
AWS_IOTSITEWISE_API TimeInNanos(Aws::Utils::Json::JsonView jsonValue);
AWS_IOTSITEWISE_API TimeInNanos& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_IOTSITEWISE_API Aws::Utils::Json::JsonValue Jsonize() const;
/**
* The timestamp date, in seconds, in the Unix epoch format. Fractional
* nanosecond data is provided by offsetInNanos
.
*/
inline long long GetTimeInSeconds() const{ return m_timeInSeconds; }
/**
* The timestamp date, in seconds, in the Unix epoch format. Fractional
* nanosecond data is provided by offsetInNanos
.
*/
inline bool TimeInSecondsHasBeenSet() const { return m_timeInSecondsHasBeenSet; }
/**
* The timestamp date, in seconds, in the Unix epoch format. Fractional
* nanosecond data is provided by offsetInNanos
.
*/
inline void SetTimeInSeconds(long long value) { m_timeInSecondsHasBeenSet = true; m_timeInSeconds = value; }
/**
* The timestamp date, in seconds, in the Unix epoch format. Fractional
* nanosecond data is provided by offsetInNanos
.
*/
inline TimeInNanos& WithTimeInSeconds(long long value) { SetTimeInSeconds(value); return *this;}
/**
* The nanosecond offset from timeInSeconds
.
*/
inline int GetOffsetInNanos() const{ return m_offsetInNanos; }
/**
* The nanosecond offset from timeInSeconds
.
*/
inline bool OffsetInNanosHasBeenSet() const { return m_offsetInNanosHasBeenSet; }
/**
* The nanosecond offset from timeInSeconds
.
*/
inline void SetOffsetInNanos(int value) { m_offsetInNanosHasBeenSet = true; m_offsetInNanos = value; }
/**
* The nanosecond offset from timeInSeconds
.
*/
inline TimeInNanos& WithOffsetInNanos(int value) { SetOffsetInNanos(value); return *this;}
private:
long long m_timeInSeconds;
bool m_timeInSecondsHasBeenSet = false;
int m_offsetInNanos;
bool m_offsetInNanosHasBeenSet = false;
};
} // namespace Model
} // namespace IoTSiteWise
} // namespace Aws