ApiSnapshotPolicy (cloudera-manager-api-swagger 7.8.1 API)
Date: 2022-11-17

com.cloudera.api.swagger.model

## Class ApiSnapshotPolicy

- java.lang.Object
- - com.cloudera.api.swagger.model.ApiSnapshotPolicy

-     @Generated(value="io.swagger.codegen.languages.JavaClientCodegen",
                 date="2022-11-17T16:22:50.425Z")
      public class ApiSnapshotPolicy
      extends Object

  A snapshot policy. <p/> Snapshot policies have service specific arguments. This object has methods to retrieve arguments for all supported types of snapshots, but only one argument type is allowed to be set; the backend will check that the provided argument matches the type of the service with which the snapshot policy is associated.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ApiSnapshotPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ApiSnapshotPolicy` | `addHoursForHourlySnapshotsItem(BigDecimal hoursForHourlySnapshotsItem)`
    `ApiSnapshotPolicy` | `alertOnAbort(Boolean alertOnAbort)`
    `ApiSnapshotPolicy` | `alertOnFail(Boolean alertOnFail)`
    `ApiSnapshotPolicy` | `alertOnStart(Boolean alertOnStart)`
    `ApiSnapshotPolicy` | `alertOnSuccess(Boolean alertOnSuccess)`
    `ApiSnapshotPolicy` | `dailySnapshots(BigDecimal dailySnapshots)`
    `ApiSnapshotPolicy` | `dayOfMonth(BigDecimal dayOfMonth)`
    `ApiSnapshotPolicy` | `dayOfWeek(BigDecimal dayOfWeek)`
    `ApiSnapshotPolicy` | `description(String description)`
    `boolean` | `equals(Object o)`
    `Boolean` | `getAlertOnAbort()` Whether to alert on abort of snapshot creation/deletion activity.
    `Boolean` | `getAlertOnFail()` Whether to alert on failure of snapshot creation/deletion activity.
    `Boolean` | `getAlertOnStart()` Whether to alert on start of snapshot creation/deletion activity.
    `Boolean` | `getAlertOnSuccess()` Whether to alert on successful completion of snapshot creation/deletion activity.
    `BigDecimal` | `getDailySnapshots()` Number of daily snapshots to be retained.
    `BigDecimal` | `getDayOfMonth()` Day of the month that monthly and yearly snapshots should be created.
    `BigDecimal` | `getDayOfWeek()` Day of the week that weekly snapshots should be created.
    `String` | `getDescription()` Description of the snapshot policy.
    `ApiHBaseSnapshotPolicyArguments` | `getHbaseArguments()` Arguments specific to HBase snapshot policies.
    `ApiHdfsSnapshotPolicyArguments` | `getHdfsArguments()` Arguments specific to Hdfs snapshot policies.
    `BigDecimal` | `getHourlySnapshots()` Number of hourly snapshots to be retained.
    `BigDecimal` | `getHourOfDay()` Hour in the day that daily, weekly, monthly and yearly snapshots should be created.
    `List<BigDecimal>` | `getHoursForHourlySnapshots()` Hours of the day that hourly snapshots should be created.
    `ApiSnapshotCommand` | `getLastCommand()` Latest command of this policy.
    `ApiSnapshotCommand` | `getLastSuccessfulCommand()` Last successful command of this policy.
    `BigDecimal` | `getMinuteOfHour()` Minute in the hour that hourly, daily, weekly, monthly and yearly snapshots should be created.
    `BigDecimal` | `getMonthlySnapshots()` Number of monthly snapshots to be retained.
    `BigDecimal` | `getMonthOfYear()` Month of the year that yearly snapshots should be created.
    `String` | `getName()` Name of the snapshot policy.
    `Boolean` | `getPaused()` Whether to pause a snapshot policy, available since V11.
    `BigDecimal` | `getWeeklySnapshots()` Number of weekly snapshots to be retained.
    `BigDecimal` | `getYearlySnapshots()` Number of yearly snapshots to be retained.
    `int` | `hashCode()`
    `ApiSnapshotPolicy` | `hbaseArguments(ApiHBaseSnapshotPolicyArguments hbaseArguments)`
    `ApiSnapshotPolicy` | `hdfsArguments(ApiHdfsSnapshotPolicyArguments hdfsArguments)`
    `ApiSnapshotPolicy` | `hourlySnapshots(BigDecimal hourlySnapshots)`
    `ApiSnapshotPolicy` | `hourOfDay(BigDecimal hourOfDay)`
    `ApiSnapshotPolicy` | `hoursForHourlySnapshots(List<BigDecimal> hoursForHourlySnapshots)`
    `ApiSnapshotPolicy` | `lastCommand(ApiSnapshotCommand lastCommand)`
    `ApiSnapshotPolicy` | `lastSuccessfulCommand(ApiSnapshotCommand lastSuccessfulCommand)`
    `ApiSnapshotPolicy` | `minuteOfHour(BigDecimal minuteOfHour)`
    `ApiSnapshotPolicy` | `monthlySnapshots(BigDecimal monthlySnapshots)`
    `ApiSnapshotPolicy` | `monthOfYear(BigDecimal monthOfYear)`
    `ApiSnapshotPolicy` | `name(String name)`
    `ApiSnapshotPolicy` | `paused(Boolean paused)`
    `void` | `setAlertOnAbort(Boolean alertOnAbort)`
    `void` | `setAlertOnFail(Boolean alertOnFail)`
    `void` | `setAlertOnStart(Boolean alertOnStart)`
    `void` | `setAlertOnSuccess(Boolean alertOnSuccess)`
    `void` | `setDailySnapshots(BigDecimal dailySnapshots)`
    `void` | `setDayOfMonth(BigDecimal dayOfMonth)`
    `void` | `setDayOfWeek(BigDecimal dayOfWeek)`
    `void` | `setDescription(String description)`
    `void` | `setHbaseArguments(ApiHBaseSnapshotPolicyArguments hbaseArguments)`
    `void` | `setHdfsArguments(ApiHdfsSnapshotPolicyArguments hdfsArguments)`
    `void` | `setHourlySnapshots(BigDecimal hourlySnapshots)`
    `void` | `setHourOfDay(BigDecimal hourOfDay)`
    `void` | `setHoursForHourlySnapshots(List<BigDecimal> hoursForHourlySnapshots)`
    `void` | `setLastCommand(ApiSnapshotCommand lastCommand)`
    `void` | `setLastSuccessfulCommand(ApiSnapshotCommand lastSuccessfulCommand)`
    `void` | `setMinuteOfHour(BigDecimal minuteOfHour)`
    `void` | `setMonthlySnapshots(BigDecimal monthlySnapshots)`
    `void` | `setMonthOfYear(BigDecimal monthOfYear)`
    `void` | `setName(String name)`
    `void` | `setPaused(Boolean paused)`
    `void` | `setWeeklySnapshots(BigDecimal weeklySnapshots)`
    `void` | `setYearlySnapshots(BigDecimal yearlySnapshots)`
    `String` | `toString()`
    `ApiSnapshotPolicy` | `weeklySnapshots(BigDecimal weeklySnapshots)`
    `ApiSnapshotPolicy` | `yearlySnapshots(BigDecimal yearlySnapshots)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ApiSnapshotPolicy

          public ApiSnapshotPolicy()

  - ### Method Detail

    - #### name

          public ApiSnapshotPolicy name(String name)

    - #### getName

          public String getName()

      Name of the snapshot policy.
      Returns:
        name

    - #### setName

          public void setName(String name)

    - #### description

          public ApiSnapshotPolicy description(String description)

    - #### getDescription

          public String getDescription()

      Description of the snapshot policy.
      Returns:
        description

    - #### setDescription

          public void setDescription(String description)

    - #### hourlySnapshots

          public ApiSnapshotPolicy hourlySnapshots(BigDecimal hourlySnapshots)

    - #### getHourlySnapshots

          public BigDecimal getHourlySnapshots()

      Number of hourly snapshots to be retained. Defaults to 0
      Returns:
        hourlySnapshots

    - #### setHourlySnapshots

          public void setHourlySnapshots(BigDecimal hourlySnapshots)

    - #### dailySnapshots

          public ApiSnapshotPolicy dailySnapshots(BigDecimal dailySnapshots)

    - #### getDailySnapshots

          public BigDecimal getDailySnapshots()

      Number of daily snapshots to be retained. Defaults to 0
      Returns:
        dailySnapshots

    - #### setDailySnapshots

          public void setDailySnapshots(BigDecimal dailySnapshots)

    - #### weeklySnapshots

          public ApiSnapshotPolicy weeklySnapshots(BigDecimal weeklySnapshots)

    - #### getWeeklySnapshots

          public BigDecimal getWeeklySnapshots()

      Number of weekly snapshots to be retained. Defaults to 0
      Returns:
        weeklySnapshots

    - #### setWeeklySnapshots

          public void setWeeklySnapshots(BigDecimal weeklySnapshots)

    - #### monthlySnapshots

          public ApiSnapshotPolicy monthlySnapshots(BigDecimal monthlySnapshots)

    - #### getMonthlySnapshots

          public BigDecimal getMonthlySnapshots()

      Number of monthly snapshots to be retained. Defaults to 0
      Returns:
        monthlySnapshots

    - #### setMonthlySnapshots

          public void setMonthlySnapshots(BigDecimal monthlySnapshots)

    - #### yearlySnapshots

          public ApiSnapshotPolicy yearlySnapshots(BigDecimal yearlySnapshots)

    - #### getYearlySnapshots

          public BigDecimal getYearlySnapshots()

      Number of yearly snapshots to be retained. Defaults to 0
      Returns:
        yearlySnapshots

    - #### setYearlySnapshots

          public void setYearlySnapshots(BigDecimal yearlySnapshots)

    - #### minuteOfHour

          public ApiSnapshotPolicy minuteOfHour(BigDecimal minuteOfHour)

    - #### getMinuteOfHour

          public BigDecimal getMinuteOfHour()

      Minute in the hour that hourly, daily, weekly, monthly and yearly snapshots should be created. Valid values are 0 to 59. Default value is 0.
      Returns:
        minuteOfHour

    - #### setMinuteOfHour

          public void setMinuteOfHour(BigDecimal minuteOfHour)

    - #### hoursForHourlySnapshots

          public ApiSnapshotPolicy hoursForHourlySnapshots(List<BigDecimal> hoursForHourlySnapshots)

    - #### addHoursForHourlySnapshotsItem

          public ApiSnapshotPolicy addHoursForHourlySnapshotsItem(BigDecimal hoursForHourlySnapshotsItem)

    - #### getHoursForHourlySnapshots

          public List<BigDecimal> getHoursForHourlySnapshots()

      Hours of the day that hourly snapshots should be created. Valid values are 0 to 23. If this list is null or empty, then hourly snapshots are created for every hour.
      Returns:
        hoursForHourlySnapshots

    - #### setHoursForHourlySnapshots

          public void setHoursForHourlySnapshots(List<BigDecimal> hoursForHourlySnapshots)

    - #### hourOfDay

          public ApiSnapshotPolicy hourOfDay(BigDecimal hourOfDay)

    - #### getHourOfDay

          public BigDecimal getHourOfDay()

      Hour in the day that daily, weekly, monthly and yearly snapshots should be created. Valid values are 0 to 23. Default value is 0.
      Returns:
        hourOfDay

    - #### setHourOfDay

          public void setHourOfDay(BigDecimal hourOfDay)

    - #### dayOfWeek

          public ApiSnapshotPolicy dayOfWeek(BigDecimal dayOfWeek)

    - #### getDayOfWeek

          public BigDecimal getDayOfWeek()

      Day of the week that weekly snapshots should be created. Valid values are 1 to 7, 1 representing Sunday. Default value is 1.
      Returns:
        dayOfWeek

    - #### setDayOfWeek

          public void setDayOfWeek(BigDecimal dayOfWeek)

    - #### dayOfMonth

          public ApiSnapshotPolicy dayOfMonth(BigDecimal dayOfMonth)

    - #### getDayOfMonth

          public BigDecimal getDayOfMonth()

      Day of the month that monthly and yearly snapshots should be created. Values from 1 to 31 are allowed. Additionally 0 to -30 can be used to specify offsets from the last day of the month. Default value is 1. <p/> If this value is invalid for any month for which snapshots are required, the backend will throw an exception.
      Returns:
        dayOfMonth

    - #### setDayOfMonth

          public void setDayOfMonth(BigDecimal dayOfMonth)

    - #### monthOfYear

          public ApiSnapshotPolicy monthOfYear(BigDecimal monthOfYear)

    - #### getMonthOfYear

          public BigDecimal getMonthOfYear()

      Month of the year that yearly snapshots should be created. Valid values are 1 to 12, 1 representing January. Default value is 1.
      Returns:
        monthOfYear

    - #### setMonthOfYear

          public void setMonthOfYear(BigDecimal monthOfYear)

    - #### alertOnStart

          public ApiSnapshotPolicy alertOnStart(Boolean alertOnStart)

    - #### getAlertOnStart

          public Boolean getAlertOnStart()

      Whether to alert on start of snapshot creation/deletion activity. Defaults to false
      Returns:
        alertOnStart

    - #### setAlertOnStart

          public void setAlertOnStart(Boolean alertOnStart)

    - #### alertOnSuccess

          public ApiSnapshotPolicy alertOnSuccess(Boolean alertOnSuccess)

    - #### getAlertOnSuccess

          public Boolean getAlertOnSuccess()

      Whether to alert on successful completion of snapshot creation/deletion activity. Defaults to false.
      Returns:
        alertOnSuccess

    - #### setAlertOnSuccess

          public void setAlertOnSuccess(Boolean alertOnSuccess)

    - #### alertOnFail

          public ApiSnapshotPolicy alertOnFail(Boolean alertOnFail)

    - #### getAlertOnFail

          public Boolean getAlertOnFail()

      Whether to alert on failure of snapshot creation/deletion activity. Defaults to false.
      Returns:
        alertOnFail

    - #### setAlertOnFail

          public void setAlertOnFail(Boolean alertOnFail)

    - #### alertOnAbort

          public ApiSnapshotPolicy alertOnAbort(Boolean alertOnAbort)

    - #### getAlertOnAbort

          public Boolean getAlertOnAbort()

      Whether to alert on abort of snapshot creation/deletion activity. Defaults to false.
      Returns:
        alertOnAbort

    - #### setAlertOnAbort

          public void setAlertOnAbort(Boolean alertOnAbort)

    - #### hbaseArguments

          public ApiSnapshotPolicy hbaseArguments(ApiHBaseSnapshotPolicyArguments hbaseArguments)

    - #### getHbaseArguments

          public ApiHBaseSnapshotPolicyArguments getHbaseArguments()

      Arguments specific to HBase snapshot policies.
      Returns:
        hbaseArguments

    - #### setHbaseArguments

          public void setHbaseArguments(ApiHBaseSnapshotPolicyArguments hbaseArguments)

    - #### hdfsArguments

          public ApiSnapshotPolicy hdfsArguments(ApiHdfsSnapshotPolicyArguments hdfsArguments)

    - #### getHdfsArguments

          public ApiHdfsSnapshotPolicyArguments getHdfsArguments()

      Arguments specific to Hdfs snapshot policies.
      Returns:
        hdfsArguments

    - #### setHdfsArguments

          public void setHdfsArguments(ApiHdfsSnapshotPolicyArguments hdfsArguments)

    - #### lastCommand

          public ApiSnapshotPolicy lastCommand(ApiSnapshotCommand lastCommand)

    - #### getLastCommand

          public ApiSnapshotCommand getLastCommand()

      Latest command of this policy. The command might still be active.
      Returns:
        lastCommand

    - #### setLastCommand

          public void setLastCommand(ApiSnapshotCommand lastCommand)

    - #### lastSuccessfulCommand

          public ApiSnapshotPolicy lastSuccessfulCommand(ApiSnapshotCommand lastSuccessfulCommand)

    - #### getLastSuccessfulCommand

          public ApiSnapshotCommand getLastSuccessfulCommand()

      Last successful command of this policy. Returns null if there has been no successful command.
      Returns:
        lastSuccessfulCommand

    - #### setLastSuccessfulCommand

          public void setLastSuccessfulCommand(ApiSnapshotCommand lastSuccessfulCommand)

    - #### paused

          public ApiSnapshotPolicy paused(Boolean paused)

    - #### getPaused

          public Boolean getPaused()

      Whether to pause a snapshot policy, available since V11.
      Returns:
        paused

    - #### setPaused

          public void setPaused(Boolean paused)

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2022. All rights reserved.