/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.dataform.v1beta1.model;

/**
 * Controls Git remote configuration for a repository.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Dataform API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GitRemoteSettings extends com.google.api.client.json.GenericJson {

  /**
   * Optional. The name of the Secret Manager secret version to use as an authentication token for
   * Git operations. Must be in the format `projects/secrets/versions`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String authenticationTokenSecretVersion;

  /**
   * Required. The Git remote's default branch name.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String defaultBranch;

  /**
   * Optional. Authentication fields for remote uris using SSH protocol.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private SshAuthenticationConfig sshAuthenticationConfig;

  /**
   * Output only. Deprecated: The field does not contain any token status information. Instead use h
   * ttps://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories/compute
   * AccessTokenStatus
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String tokenStatus;

  /**
   * Required. The Git remote's URL.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String url;

  /**
   * Optional. The name of the Secret Manager secret version to use as an authentication token for
   * Git operations. Must be in the format `projects/secrets/versions`.
   * @return value or {@code null} for none
   */
  public java.lang.String getAuthenticationTokenSecretVersion() {
    return authenticationTokenSecretVersion;
  }

  /**
   * Optional. The name of the Secret Manager secret version to use as an authentication token for
   * Git operations. Must be in the format `projects/secrets/versions`.
   * @param authenticationTokenSecretVersion authenticationTokenSecretVersion or {@code null} for none
   */
  public GitRemoteSettings setAuthenticationTokenSecretVersion(java.lang.String authenticationTokenSecretVersion) {
    this.authenticationTokenSecretVersion = authenticationTokenSecretVersion;
    return this;
  }

  /**
   * Required. The Git remote's default branch name.
   * @return value or {@code null} for none
   */
  public java.lang.String getDefaultBranch() {
    return defaultBranch;
  }

  /**
   * Required. The Git remote's default branch name.
   * @param defaultBranch defaultBranch or {@code null} for none
   */
  public GitRemoteSettings setDefaultBranch(java.lang.String defaultBranch) {
    this.defaultBranch = defaultBranch;
    return this;
  }

  /**
   * Optional. Authentication fields for remote uris using SSH protocol.
   * @return value or {@code null} for none
   */
  public SshAuthenticationConfig getSshAuthenticationConfig() {
    return sshAuthenticationConfig;
  }

  /**
   * Optional. Authentication fields for remote uris using SSH protocol.
   * @param sshAuthenticationConfig sshAuthenticationConfig or {@code null} for none
   */
  public GitRemoteSettings setSshAuthenticationConfig(SshAuthenticationConfig sshAuthenticationConfig) {
    this.sshAuthenticationConfig = sshAuthenticationConfig;
    return this;
  }

  /**
   * Output only. Deprecated: The field does not contain any token status information. Instead use h
   * ttps://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories/compute
   * AccessTokenStatus
   * @return value or {@code null} for none
   */
  public java.lang.String getTokenStatus() {
    return tokenStatus;
  }

  /**
   * Output only. Deprecated: The field does not contain any token status information. Instead use h
   * ttps://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories/compute
   * AccessTokenStatus
   * @param tokenStatus tokenStatus or {@code null} for none
   */
  public GitRemoteSettings setTokenStatus(java.lang.String tokenStatus) {
    this.tokenStatus = tokenStatus;
    return this;
  }

  /**
   * Required. The Git remote's URL.
   * @return value or {@code null} for none
   */
  public java.lang.String getUrl() {
    return url;
  }

  /**
   * Required. The Git remote's URL.
   * @param url url or {@code null} for none
   */
  public GitRemoteSettings setUrl(java.lang.String url) {
    this.url = url;
    return this;
  }

  @Override
  public GitRemoteSettings set(String fieldName, Object value) {
    return (GitRemoteSettings) super.set(fieldName, value);
  }

  @Override
  public GitRemoteSettings clone() {
    return (GitRemoteSettings) super.clone();
  }

}
