/* * Copyright 2012 Splunk, Inc. * * 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. */ namespace Splunk { /// /// This represents the Application class /// public class Application : Entity { /// /// Initializes a new instance of the class. /// /// The connected service /// The path public Application(Service service, string path) : base(service, path) { } /// /// Gets or sets the name of the app's author. For Splunkbase /// apps, this value is the username of the Splunk.com account. For /// internal apps, this value is the full name. /// public string Author { get { return this.GetString("author", null); } set { this.SetCacheValue("author", value); } } /// /// Gets or sets a value indicating whether Splunk checks Splunkbase for /// updates. /// public bool CheckForUpdates { get { return this.GetBoolean("check_for_updates", false); } set { this.SetCacheValue("check_for_updates", value); } } /// /// Gets or sets the short description of the app. /// public string Description { get { return this.GetString("description", null); } set { this.SetCacheValue("description", value); } } /// /// Gets or sets the app's label (its name) /// /// public string Label { get { return this.GetString("label", null); } set { this.SetCacheValue("label", value); } } /// /// Gets a value indicating whether to reload objects contained in the /// locally-installed app. /// public bool Refreshes { get { return this.GetBoolean("refresh", false); } } /// /// Gets or sets the version of the app. /// public string Version { get { return this.GetString("version", null); } set { this.SetCacheValue("version", value); } } /// /// Gets or sets a value indicating whether the app's custom setup has /// been performed. This field is available in Splunk version 4.2.4 and /// later. /// public bool IsConfigured { get { return this.GetBoolean("configured", false); } set { this.SetCacheValue("configured", value); } } /// /// Gets or sets a value indicating whether the app can be managed by /// Splunk Manager. Note: this is deprecated in Splunk 5.0. /// public bool IsManageable { get { return this.GetBoolean("manageable", false); } set { this.SetCacheValue("manageable", value); } } /// /// Gets or sets a value indicating whether the app is visible and /// navigable from Splunk Web. /// public bool IsVisible { get { return this.GetBoolean("visible", false); } set { this.SetCacheValue("visible", value); } } /// /// Gets a value indicating whether a state change requires the app to /// be restarted. /// public bool StateChangeRequiresRestart { get { return this.GetBoolean("state_change_requires_restart", false); } } /// /// Returns any update information that is available for the app. /// /// The update information public ApplicationUpdate AppUpdate() { return new ApplicationUpdate(this.Service, this.Path); } /// /// Archives the app on the server file system. /// /// The archive information public ApplicationArchive Archive() { return new ApplicationArchive(this.Service, this.Path); } /// /// Returns the app's setup information. /// /// The setup information public ApplicationSetup Setup() { return new ApplicationSetup(this.Service, this.Path); } } }