/*
 * Copyright 2016 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License 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 org.gradle.api.internal.tasks.cache.origin;

import org.gradle.api.internal.tasks.cache.OriginMetadata;

public class DefaultOriginMetadata implements OriginMetadata {
    private final String path;
    private final String type;
    private final String gradleVersion;
    private final long creationTime;
    private final long executionTime;

    private final String rootPath;
    private final String operatingSystem;
    private final String hostName;
    private final String userName;

    public DefaultOriginMetadata(String path, String type, String gradleVersion, long creationTime, long executionTime, String rootPath, String operatingSystem, String hostName, String userName) {
        this.path = path;
        this.type = type;
        this.gradleVersion = gradleVersion;
        this.creationTime = creationTime;
        this.executionTime = executionTime;
        this.rootPath = rootPath;
        this.operatingSystem = operatingSystem;
        this.hostName = hostName;
        this.userName = userName;
    }

    @Override
    public long getCreationTime() {
        return creationTime;
    }

    @Override
    public String getPath() {
        return path;
    }

    @Override
    public String getType() {
        return type;
    }

    @Override
    public String getGradleVersion() {
        return gradleVersion;
    }

    @Override
    public long getExecutionTime() {
        return executionTime;
    }

    @Override
    public String getRootPath() {
        return rootPath;
    }

    @Override
    public String getOperatingSystem() {
        return operatingSystem;
    }

    @Override
    public String getHostName() {
        return hostName;
    }

    @Override
    public String getUserName() {
        return userName;
    }
}

@@ -1640,32 +1640,559 @@
 serName;%0A    %7D%0A%0A
+    @Override%0A    public String toString() %7B%0A        return %22origin%7B%22 +%0A            %22path='%22 + path + '%5C'' +%0A            %22, type='%22 + type + '%5C'' +%0A            %22, gradleVersion='%22 + gradleVersion + '%5C'' +%0A            %22, creationTime=%22 + creationTime +%0A            %22, executionTime=%22 + executionTime +%0A            %22, rootPath='%22 + rootPath + '%5C'' +%0A            %22, operatingSystem='%22 + operatingSystem + '%5C'' +%0A            %22, hostName='%22 + hostName + '%5C'' +%0A            %22, userName='%22 + userName + '%5C'' +%0A            '%7D';%0A    %7D%0A%0A
     @Override%0A  

Add debugging string to origin metadata