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

com.azure.resourcemanager.automation.models.SourceControlSyncJobCreateParameters Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for Automation Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Automation Client. Package tag package-2019-06.

There is a newer version: 1.0.0
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.automation.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The parameters supplied to the create source control sync job operation. */
@JsonFlatten
@Fluent
public class SourceControlSyncJobCreateParameters {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(SourceControlSyncJobCreateParameters.class);

    /*
     * The commit id of the source control sync job. If not syncing to a
     * commitId, enter an empty string.
     */
    @JsonProperty(value = "properties.commitId", required = true)
    private String commitId;

    /**
     * Get the commitId property: The commit id of the source control sync job. If not syncing to a commitId, enter an
     * empty string.
     *
     * @return the commitId value.
     */
    public String commitId() {
        return this.commitId;
    }

    /**
     * Set the commitId property: The commit id of the source control sync job. If not syncing to a commitId, enter an
     * empty string.
     *
     * @param commitId the commitId value to set.
     * @return the SourceControlSyncJobCreateParameters object itself.
     */
    public SourceControlSyncJobCreateParameters withCommitId(String commitId) {
        this.commitId = commitId;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (commitId() == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property commitId in model SourceControlSyncJobCreateParameters"));
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy