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

com.azure.resourcemanager.migrationdiscoverysap.implementation.OperationStatusResultImpl Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for MigrationDiscoverySap Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Migration Discovery SAP Client. Package tag package-preview-2023-10.

There is a newer version: 1.0.0-beta.2
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.migrationdiscoverysap.implementation;

import com.azure.core.management.exception.ManagementError;
import com.azure.resourcemanager.migrationdiscoverysap.fluent.models.OperationStatusResultInner;
import com.azure.resourcemanager.migrationdiscoverysap.models.OperationStatusResult;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

public final class OperationStatusResultImpl implements OperationStatusResult {
    private OperationStatusResultInner innerObject;

    private final com.azure.resourcemanager.migrationdiscoverysap.MigrationDiscoverySapManager serviceManager;

    OperationStatusResultImpl(OperationStatusResultInner innerObject,
        com.azure.resourcemanager.migrationdiscoverysap.MigrationDiscoverySapManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

    public String id() {
        return this.innerModel().id();
    }

    public String name() {
        return this.innerModel().name();
    }

    public String status() {
        return this.innerModel().status();
    }

    public Float percentComplete() {
        return this.innerModel().percentComplete();
    }

    public OffsetDateTime startTime() {
        return this.innerModel().startTime();
    }

    public OffsetDateTime endTime() {
        return this.innerModel().endTime();
    }

    public List operations() {
        List inner = this.innerModel().operations();
        if (inner != null) {
            return Collections.unmodifiableList(inner.stream()
                .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())).collect(Collectors.toList()));
        } else {
            return Collections.emptyList();
        }
    }

    public ManagementError error() {
        return this.innerModel().error();
    }

    public OperationStatusResultInner innerModel() {
        return this.innerObject;
    }

    private com.azure.resourcemanager.migrationdiscoverysap.MigrationDiscoverySapManager manager() {
        return this.serviceManager;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy