1// Package spark implements the Azure ARM Spark service API version 2019-11-01-preview. 2// 3// 4package spark 5 6// Copyright (c) Microsoft Corporation. All rights reserved. 7// Licensed under the MIT License. See License.txt in the project root for license information. 8// 9// Code generated by Microsoft (R) AutoRest Code Generator. 10// Changes may cause incorrect behavior and will be lost if the code is regenerated. 11 12import ( 13 "github.com/Azure/go-autorest/autorest" 14) 15 16const ( 17 // DefaultLivyAPIVersion is the default value for livy api version 18 DefaultLivyAPIVersion = "2019-11-01-preview" 19) 20 21// BaseClient is the base client for Spark. 22type BaseClient struct { 23 autorest.Client 24 Endpoint string 25 LivyAPIVersion string 26 SparkPoolName string 27} 28 29// New creates an instance of the BaseClient client. 30func New(endpoint string, sparkPoolName string) BaseClient { 31 return NewWithoutDefaults(endpoint, sparkPoolName, DefaultLivyAPIVersion) 32} 33 34// NewWithoutDefaults creates an instance of the BaseClient client. 35func NewWithoutDefaults(endpoint string, sparkPoolName string, livyAPIVersion string) BaseClient { 36 return BaseClient{ 37 Client: autorest.NewClientWithUserAgent(UserAgent()), 38 Endpoint: endpoint, 39 LivyAPIVersion: livyAPIVersion, 40 SparkPoolName: sparkPoolName, 41 } 42} 43