All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.kinesisvideo.model.DescribeEdgeConfigurationResponse Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Kinesis Video Streams module holds the client classes that are used for communicating with Amazon Kinesis Video Streams Service

There is a newer version: 2.28.4
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.kinesisvideo.model;

import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class DescribeEdgeConfigurationResponse extends KinesisVideoResponse implements
        ToCopyableBuilder {
    private static final SdkField STREAM_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("StreamName").getter(getter(DescribeEdgeConfigurationResponse::streamName))
            .setter(setter(Builder::streamName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StreamName").build()).build();

    private static final SdkField STREAM_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("StreamARN").getter(getter(DescribeEdgeConfigurationResponse::streamARN))
            .setter(setter(Builder::streamARN))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StreamARN").build()).build();

    private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("CreationTime").getter(getter(DescribeEdgeConfigurationResponse::creationTime))
            .setter(setter(Builder::creationTime))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build();

    private static final SdkField LAST_UPDATED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("LastUpdatedTime").getter(getter(DescribeEdgeConfigurationResponse::lastUpdatedTime))
            .setter(setter(Builder::lastUpdatedTime))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastUpdatedTime").build()).build();

    private static final SdkField SYNC_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("SyncStatus").getter(getter(DescribeEdgeConfigurationResponse::syncStatusAsString))
            .setter(setter(Builder::syncStatus))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SyncStatus").build()).build();

    private static final SdkField FAILED_STATUS_DETAILS_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("FailedStatusDetails").getter(getter(DescribeEdgeConfigurationResponse::failedStatusDetails))
            .setter(setter(Builder::failedStatusDetails))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FailedStatusDetails").build())
            .build();

    private static final SdkField EDGE_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
            .memberName("EdgeConfig").getter(getter(DescribeEdgeConfigurationResponse::edgeConfig))
            .setter(setter(Builder::edgeConfig)).constructor(EdgeConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EdgeConfig").build()).build();

    private static final SdkField EDGE_AGENT_STATUS_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("EdgeAgentStatus")
            .getter(getter(DescribeEdgeConfigurationResponse::edgeAgentStatus)).setter(setter(Builder::edgeAgentStatus))
            .constructor(EdgeAgentStatus::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EdgeAgentStatus").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(STREAM_NAME_FIELD,
            STREAM_ARN_FIELD, CREATION_TIME_FIELD, LAST_UPDATED_TIME_FIELD, SYNC_STATUS_FIELD, FAILED_STATUS_DETAILS_FIELD,
            EDGE_CONFIG_FIELD, EDGE_AGENT_STATUS_FIELD));

    private final String streamName;

    private final String streamARN;

    private final Instant creationTime;

    private final Instant lastUpdatedTime;

    private final String syncStatus;

    private final String failedStatusDetails;

    private final EdgeConfig edgeConfig;

    private final EdgeAgentStatus edgeAgentStatus;

    private DescribeEdgeConfigurationResponse(BuilderImpl builder) {
        super(builder);
        this.streamName = builder.streamName;
        this.streamARN = builder.streamARN;
        this.creationTime = builder.creationTime;
        this.lastUpdatedTime = builder.lastUpdatedTime;
        this.syncStatus = builder.syncStatus;
        this.failedStatusDetails = builder.failedStatusDetails;
        this.edgeConfig = builder.edgeConfig;
        this.edgeAgentStatus = builder.edgeAgentStatus;
    }

    /**
     * 

* The name of the stream from which the edge configuration was updated. *

* * @return The name of the stream from which the edge configuration was updated. */ public final String streamName() { return streamName; } /** *

* The Amazon Resource Name (ARN) of the stream. *

* * @return The Amazon Resource Name (ARN) of the stream. */ public final String streamARN() { return streamARN; } /** *

* The timestamp at which a stream’s edge configuration was first created. *

* * @return The timestamp at which a stream’s edge configuration was first created. */ public final Instant creationTime() { return creationTime; } /** *

* The timestamp at which a stream’s edge configuration was last updated. *

* * @return The timestamp at which a stream’s edge configuration was last updated. */ public final Instant lastUpdatedTime() { return lastUpdatedTime; } /** *

* The latest status of the edge configuration update. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #syncStatus} will * return {@link SyncStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #syncStatusAsString}. *

* * @return The latest status of the edge configuration update. * @see SyncStatus */ public final SyncStatus syncStatus() { return SyncStatus.fromValue(syncStatus); } /** *

* The latest status of the edge configuration update. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #syncStatus} will * return {@link SyncStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #syncStatusAsString}. *

* * @return The latest status of the edge configuration update. * @see SyncStatus */ public final String syncStatusAsString() { return syncStatus; } /** *

* A description of the generated failure status. *

* * @return A description of the generated failure status. */ public final String failedStatusDetails() { return failedStatusDetails; } /** *

* A description of the stream's edge configuration that will be used to sync with the Edge Agent IoT Greengrass * component. The Edge Agent component will run on an IoT Hub Device setup at your premise. *

* * @return A description of the stream's edge configuration that will be used to sync with the Edge Agent IoT * Greengrass component. The Edge Agent component will run on an IoT Hub Device setup at your premise. */ public final EdgeConfig edgeConfig() { return edgeConfig; } /** *

* An object that contains the latest status details for an edge agent's recorder and uploader jobs. Use this * information to determine the current health of an edge agent. *

* * @return An object that contains the latest status details for an edge agent's recorder and uploader jobs. Use * this information to determine the current health of an edge agent. */ public final EdgeAgentStatus edgeAgentStatus() { return edgeAgentStatus; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(streamName()); hashCode = 31 * hashCode + Objects.hashCode(streamARN()); hashCode = 31 * hashCode + Objects.hashCode(creationTime()); hashCode = 31 * hashCode + Objects.hashCode(lastUpdatedTime()); hashCode = 31 * hashCode + Objects.hashCode(syncStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(failedStatusDetails()); hashCode = 31 * hashCode + Objects.hashCode(edgeConfig()); hashCode = 31 * hashCode + Objects.hashCode(edgeAgentStatus()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof DescribeEdgeConfigurationResponse)) { return false; } DescribeEdgeConfigurationResponse other = (DescribeEdgeConfigurationResponse) obj; return Objects.equals(streamName(), other.streamName()) && Objects.equals(streamARN(), other.streamARN()) && Objects.equals(creationTime(), other.creationTime()) && Objects.equals(lastUpdatedTime(), other.lastUpdatedTime()) && Objects.equals(syncStatusAsString(), other.syncStatusAsString()) && Objects.equals(failedStatusDetails(), other.failedStatusDetails()) && Objects.equals(edgeConfig(), other.edgeConfig()) && Objects.equals(edgeAgentStatus(), other.edgeAgentStatus()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("DescribeEdgeConfigurationResponse").add("StreamName", streamName()) .add("StreamARN", streamARN()).add("CreationTime", creationTime()).add("LastUpdatedTime", lastUpdatedTime()) .add("SyncStatus", syncStatusAsString()).add("FailedStatusDetails", failedStatusDetails()) .add("EdgeConfig", edgeConfig()).add("EdgeAgentStatus", edgeAgentStatus()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "StreamName": return Optional.ofNullable(clazz.cast(streamName())); case "StreamARN": return Optional.ofNullable(clazz.cast(streamARN())); case "CreationTime": return Optional.ofNullable(clazz.cast(creationTime())); case "LastUpdatedTime": return Optional.ofNullable(clazz.cast(lastUpdatedTime())); case "SyncStatus": return Optional.ofNullable(clazz.cast(syncStatusAsString())); case "FailedStatusDetails": return Optional.ofNullable(clazz.cast(failedStatusDetails())); case "EdgeConfig": return Optional.ofNullable(clazz.cast(edgeConfig())); case "EdgeAgentStatus": return Optional.ofNullable(clazz.cast(edgeAgentStatus())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((DescribeEdgeConfigurationResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends KinesisVideoResponse.Builder, SdkPojo, CopyableBuilder { /** *

* The name of the stream from which the edge configuration was updated. *

* * @param streamName * The name of the stream from which the edge configuration was updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder streamName(String streamName); /** *

* The Amazon Resource Name (ARN) of the stream. *

* * @param streamARN * The Amazon Resource Name (ARN) of the stream. * @return Returns a reference to this object so that method calls can be chained together. */ Builder streamARN(String streamARN); /** *

* The timestamp at which a stream’s edge configuration was first created. *

* * @param creationTime * The timestamp at which a stream’s edge configuration was first created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creationTime(Instant creationTime); /** *

* The timestamp at which a stream’s edge configuration was last updated. *

* * @param lastUpdatedTime * The timestamp at which a stream’s edge configuration was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastUpdatedTime(Instant lastUpdatedTime); /** *

* The latest status of the edge configuration update. *

* * @param syncStatus * The latest status of the edge configuration update. * @see SyncStatus * @return Returns a reference to this object so that method calls can be chained together. * @see SyncStatus */ Builder syncStatus(String syncStatus); /** *

* The latest status of the edge configuration update. *

* * @param syncStatus * The latest status of the edge configuration update. * @see SyncStatus * @return Returns a reference to this object so that method calls can be chained together. * @see SyncStatus */ Builder syncStatus(SyncStatus syncStatus); /** *

* A description of the generated failure status. *

* * @param failedStatusDetails * A description of the generated failure status. * @return Returns a reference to this object so that method calls can be chained together. */ Builder failedStatusDetails(String failedStatusDetails); /** *

* A description of the stream's edge configuration that will be used to sync with the Edge Agent IoT Greengrass * component. The Edge Agent component will run on an IoT Hub Device setup at your premise. *

* * @param edgeConfig * A description of the stream's edge configuration that will be used to sync with the Edge Agent IoT * Greengrass component. The Edge Agent component will run on an IoT Hub Device setup at your premise. * @return Returns a reference to this object so that method calls can be chained together. */ Builder edgeConfig(EdgeConfig edgeConfig); /** *

* A description of the stream's edge configuration that will be used to sync with the Edge Agent IoT Greengrass * component. The Edge Agent component will run on an IoT Hub Device setup at your premise. *

* This is a convenience method that creates an instance of the {@link EdgeConfig.Builder} avoiding the need to * create one manually via {@link EdgeConfig#builder()}. * *

* When the {@link Consumer} completes, {@link EdgeConfig.Builder#build()} is called immediately and its result * is passed to {@link #edgeConfig(EdgeConfig)}. * * @param edgeConfig * a consumer that will call methods on {@link EdgeConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #edgeConfig(EdgeConfig) */ default Builder edgeConfig(Consumer edgeConfig) { return edgeConfig(EdgeConfig.builder().applyMutation(edgeConfig).build()); } /** *

* An object that contains the latest status details for an edge agent's recorder and uploader jobs. Use this * information to determine the current health of an edge agent. *

* * @param edgeAgentStatus * An object that contains the latest status details for an edge agent's recorder and uploader jobs. Use * this information to determine the current health of an edge agent. * @return Returns a reference to this object so that method calls can be chained together. */ Builder edgeAgentStatus(EdgeAgentStatus edgeAgentStatus); /** *

* An object that contains the latest status details for an edge agent's recorder and uploader jobs. Use this * information to determine the current health of an edge agent. *

* This is a convenience method that creates an instance of the {@link EdgeAgentStatus.Builder} avoiding the * need to create one manually via {@link EdgeAgentStatus#builder()}. * *

* When the {@link Consumer} completes, {@link EdgeAgentStatus.Builder#build()} is called immediately and its * result is passed to {@link #edgeAgentStatus(EdgeAgentStatus)}. * * @param edgeAgentStatus * a consumer that will call methods on {@link EdgeAgentStatus.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #edgeAgentStatus(EdgeAgentStatus) */ default Builder edgeAgentStatus(Consumer edgeAgentStatus) { return edgeAgentStatus(EdgeAgentStatus.builder().applyMutation(edgeAgentStatus).build()); } } static final class BuilderImpl extends KinesisVideoResponse.BuilderImpl implements Builder { private String streamName; private String streamARN; private Instant creationTime; private Instant lastUpdatedTime; private String syncStatus; private String failedStatusDetails; private EdgeConfig edgeConfig; private EdgeAgentStatus edgeAgentStatus; private BuilderImpl() { } private BuilderImpl(DescribeEdgeConfigurationResponse model) { super(model); streamName(model.streamName); streamARN(model.streamARN); creationTime(model.creationTime); lastUpdatedTime(model.lastUpdatedTime); syncStatus(model.syncStatus); failedStatusDetails(model.failedStatusDetails); edgeConfig(model.edgeConfig); edgeAgentStatus(model.edgeAgentStatus); } public final String getStreamName() { return streamName; } public final void setStreamName(String streamName) { this.streamName = streamName; } @Override public final Builder streamName(String streamName) { this.streamName = streamName; return this; } public final String getStreamARN() { return streamARN; } public final void setStreamARN(String streamARN) { this.streamARN = streamARN; } @Override public final Builder streamARN(String streamARN) { this.streamARN = streamARN; return this; } public final Instant getCreationTime() { return creationTime; } public final void setCreationTime(Instant creationTime) { this.creationTime = creationTime; } @Override public final Builder creationTime(Instant creationTime) { this.creationTime = creationTime; return this; } public final Instant getLastUpdatedTime() { return lastUpdatedTime; } public final void setLastUpdatedTime(Instant lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } @Override public final Builder lastUpdatedTime(Instant lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; return this; } public final String getSyncStatus() { return syncStatus; } public final void setSyncStatus(String syncStatus) { this.syncStatus = syncStatus; } @Override public final Builder syncStatus(String syncStatus) { this.syncStatus = syncStatus; return this; } @Override public final Builder syncStatus(SyncStatus syncStatus) { this.syncStatus(syncStatus == null ? null : syncStatus.toString()); return this; } public final String getFailedStatusDetails() { return failedStatusDetails; } public final void setFailedStatusDetails(String failedStatusDetails) { this.failedStatusDetails = failedStatusDetails; } @Override public final Builder failedStatusDetails(String failedStatusDetails) { this.failedStatusDetails = failedStatusDetails; return this; } public final EdgeConfig.Builder getEdgeConfig() { return edgeConfig != null ? edgeConfig.toBuilder() : null; } public final void setEdgeConfig(EdgeConfig.BuilderImpl edgeConfig) { this.edgeConfig = edgeConfig != null ? edgeConfig.build() : null; } @Override public final Builder edgeConfig(EdgeConfig edgeConfig) { this.edgeConfig = edgeConfig; return this; } public final EdgeAgentStatus.Builder getEdgeAgentStatus() { return edgeAgentStatus != null ? edgeAgentStatus.toBuilder() : null; } public final void setEdgeAgentStatus(EdgeAgentStatus.BuilderImpl edgeAgentStatus) { this.edgeAgentStatus = edgeAgentStatus != null ? edgeAgentStatus.build() : null; } @Override public final Builder edgeAgentStatus(EdgeAgentStatus edgeAgentStatus) { this.edgeAgentStatus = edgeAgentStatus; return this; } @Override public DescribeEdgeConfigurationResponse build() { return new DescribeEdgeConfigurationResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy