// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.kubernetesconfiguration.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Parameters to reconcile to the Bucket source kind type. */
@Fluent
public final class BucketPatchDefinition {
    /*
     * The URL to sync for the flux configuration S3 bucket.
     */
    @JsonProperty(value = "url")
    private String url;

    /*
     * The bucket name to sync from the url endpoint for the flux configuration.
     */
    @JsonProperty(value = "bucketName")
    private String bucketName;

    /*
     * Specify whether to use insecure communication when puling data from the S3 bucket.
     */
    @JsonProperty(value = "insecure")
    private Boolean insecure;

    /*
     * The maximum time to attempt to reconcile the cluster bucket source with the remote.
     */
    @JsonProperty(value = "timeoutInSeconds")
    private Long timeoutInSeconds;

    /*
     * The interval at which to re-reconcile the cluster bucket source with the remote.
     */
    @JsonProperty(value = "syncIntervalInSeconds")
    private Long syncIntervalInSeconds;

    /*
     * Plaintext access key used to securely access the S3 bucket
     */
    @JsonProperty(value = "accessKey")
    private String accessKey;

    /*
     * Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or
     * user-provided configuration secrets.
     */
    @JsonProperty(value = "localAuthRef")
    private String localAuthRef;

    /** Creates an instance of BucketPatchDefinition class. */
    public BucketPatchDefinition() {
    }

    /**
     * Get the url property: The URL to sync for the flux configuration S3 bucket.
     *
     * @return the url value.
     */
    public String url() {
        return this.url;
    }

    /**
     * Set the url property: The URL to sync for the flux configuration S3 bucket.
     *
     * @param url the url value to set.
     * @return the BucketPatchDefinition object itself.
     */
    public BucketPatchDefinition withUrl(String url) {
        this.url = url;
        return this;
    }

    /**
     * Get the bucketName property: The bucket name to sync from the url endpoint for the flux configuration.
     *
     * @return the bucketName value.
     */
    public String bucketName() {
        return this.bucketName;
    }

    /**
     * Set the bucketName property: The bucket name to sync from the url endpoint for the flux configuration.
     *
     * @param bucketName the bucketName value to set.
     * @return the BucketPatchDefinition object itself.
     */
    public BucketPatchDefinition withBucketName(String bucketName) {
        this.bucketName = bucketName;
        return this;
    }

    /**
     * Get the insecure property: Specify whether to use insecure communication when puling data from the S3 bucket.
     *
     * @return the insecure value.
     */
    public Boolean insecure() {
        return this.insecure;
    }

    /**
     * Set the insecure property: Specify whether to use insecure communication when puling data from the S3 bucket.
     *
     * @param insecure the insecure value to set.
     * @return the BucketPatchDefinition object itself.
     */
    public BucketPatchDefinition withInsecure(Boolean insecure) {
        this.insecure = insecure;
        return this;
    }

    /**
     * Get the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster bucket source with the
     * remote.
     *
     * @return the timeoutInSeconds value.
     */
    public Long timeoutInSeconds() {
        return this.timeoutInSeconds;
    }

    /**
     * Set the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster bucket source with the
     * remote.
     *
     * @param timeoutInSeconds the timeoutInSeconds value to set.
     * @return the BucketPatchDefinition object itself.
     */
    public BucketPatchDefinition withTimeoutInSeconds(Long timeoutInSeconds) {
        this.timeoutInSeconds = timeoutInSeconds;
        return this;
    }

    /**
     * Get the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster bucket source with the
     * remote.
     *
     * @return the syncIntervalInSeconds value.
     */
    public Long syncIntervalInSeconds() {
        return this.syncIntervalInSeconds;
    }

    /**
     * Set the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster bucket source with the
     * remote.
     *
     * @param syncIntervalInSeconds the syncIntervalInSeconds value to set.
     * @return the BucketPatchDefinition object itself.
     */
    public BucketPatchDefinition withSyncIntervalInSeconds(Long syncIntervalInSeconds) {
        this.syncIntervalInSeconds = syncIntervalInSeconds;
        return this;
    }

    /**
     * Get the accessKey property: Plaintext access key used to securely access the S3 bucket.
     *
     * @return the accessKey value.
     */
    public String accessKey() {
        return this.accessKey;
    }

    /**
     * Set the accessKey property: Plaintext access key used to securely access the S3 bucket.
     *
     * @param accessKey the accessKey value to set.
     * @return the BucketPatchDefinition object itself.
     */
    public BucketPatchDefinition withAccessKey(String accessKey) {
        this.accessKey = accessKey;
        return this;
    }

    /**
     * Get the localAuthRef property: Name of a local secret on the Kubernetes cluster to use as the authentication
     * secret rather than the managed or user-provided configuration secrets.
     *
     * @return the localAuthRef value.
     */
    public String localAuthRef() {
        return this.localAuthRef;
    }

    /**
     * Set the localAuthRef property: Name of a local secret on the Kubernetes cluster to use as the authentication
     * secret rather than the managed or user-provided configuration secrets.
     *
     * @param localAuthRef the localAuthRef value to set.
     * @return the BucketPatchDefinition object itself.
     */
    public BucketPatchDefinition withLocalAuthRef(String localAuthRef) {
        this.localAuthRef = localAuthRef;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
