<commit_before>package io.subutai.common.protocol;


import org.codehaus.jackson.annotate.JsonProperty;

import com.google.common.base.Preconditions;
import com.google.common.base.Strings;


public class P2PCredentials
{
    @JsonProperty
    private String environmentId;
    @JsonProperty
    private String p2pHash;
    @JsonProperty
    private String p2pSecretKey;
    @JsonProperty
    private long p2pTtlSeconds;


    public P2PCredentials( final String environmentId, final String p2pHash, final String p2pSecretKey,
                           final long p2pTtlSeconds )
    {
        Preconditions.checkArgument( !Strings.isNullOrEmpty( environmentId ), "Invalid environment id" );
        Preconditions.checkArgument( !Strings.isNullOrEmpty( p2pHash ), "Invalid p2p hash" );
        Preconditions.checkArgument( !Strings.isNullOrEmpty( p2pSecretKey ), "Invalid p2p secret key" );
        Preconditions.checkArgument( p2pTtlSeconds > 0, "Invalid time-to-live" );

        this.environmentId = environmentId;
        this.p2pHash = p2pHash;
        this.p2pSecretKey = p2pSecretKey;
        this.p2pTtlSeconds = p2pTtlSeconds;
    }
<commit_msg>bugfix for p2p reset key functionality<commit_after>package io.subutai.common.protocol;


import org.codehaus.jackson.annotate.JsonProperty;

import com.google.common.base.Preconditions;
import com.google.common.base.Strings;


public class P2PCredentials
{
    @JsonProperty
    private String environmentId;
    @JsonProperty
    private String p2pHash;
    @JsonProperty
    private String p2pSecretKey;
    @JsonProperty
    private long p2pTtlSeconds;


    public P2PCredentials( @JsonProperty( "environmentId" ) final String environmentId,
                           @JsonProperty( "p2pHash" ) final String p2pHash,
                           @JsonProperty( "p2pSecretKey" ) final String p2pSecretKey,
                           @JsonProperty( "p2pTtlSeconds" ) final long p2pTtlSeconds )
    {
        Preconditions.checkArgument( !Strings.isNullOrEmpty( environmentId ), "Invalid environment id" );
        Preconditions.checkArgument( !Strings.isNullOrEmpty( p2pHash ), "Invalid p2p hash" );
        Preconditions.checkArgument( !Strings.isNullOrEmpty( p2pSecretKey ), "Invalid p2p secret key" );
        Preconditions.checkArgument( p2pTtlSeconds > 0, "Invalid time-to-live" );

        this.environmentId = environmentId;
        this.p2pHash = p2pHash;
        this.p2pSecretKey = p2pSecretKey;
        this.p2pTtlSeconds = p2pTtlSeconds;
    }

{'fraction_non_alphanumeric': 0.08200636942675159, 'fraction_numerical': 0.01751592356687898, 'mean_word_length': 3.2449324324324325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5836503', 'n_tokens_mistral': 766, 'n_tokens_neox': 751, 'n_words': 159}