text:
var dl = require('datalib'),
    parseProperties = require('./properties');

function parseMark(model, mark, applyDefaults) {
  var props = mark.properties || (applyDefaults && (mark.properties = {})),
      enter = props.enter || (applyDefaults && (props.enter = {})),
      group = mark.marks,
      config = model.config().marks || {};

  if (applyDefaults) {
    // for scatter plots, set symbol size specified in config if not in spec
    if (mark.type === 'symbol' && !enter.size && config.symbolSize) {
        enter.size = {value: config.symbolSize};
    }

    // Themes define a default "color" that maps to fill/stroke based on mark type.
    var colorMap = {
      arc: 'fill', area: 'fill', rect: 'fill', symbol: 'fill', text: 'fill',
      line: 'stroke', path: 'stroke', rule: 'stroke'
    };

    // Set default mark color if no color is given in spec, and only do so for
    // user-defined marks (not axis/legend marks).
    var colorProp = colorMap[mark.type];
    if (!enter[colorProp] && config.color) {
      enter[colorProp] = {value: config.color};
    }
  }

  // parse mark property definitions
  dl.keys(props).forEach(function(k) {
    props[k] = parseProperties(model, mark.type, props[k]);
  });

  // parse delay function
  if (mark.delay) {
    mark.delay = parseProperties(model, mark.type, {delay: mark.delay});
  }

  // recurse if group type
  if (group) {
    mark.marks = group.map(function(g) { return parseMark(model, g, true); });
  }

  return mark;
}

module.exports = parseMark;

parseMark.schema = {
  "defs": {
    "mark": {
      "type": "object",

      "properties": {
        "name": {"type": "string"},
        "key": {"type": "string"},
        "type": {"enum": ["rect", "symbol", "path", "arc",
          "area", "line", "rule", "image", "text", "group"]},

        "from": {
          "type": "object",
          "properties": {
            "data": {"type": "string"},
            "mark": {"type": "string"},
            "transform": {"$ref": "#/defs/transform"}
          },
          "additionalProperties": false
        },

        "delay": {"$ref": "#/refs/numberValue"},
        "ease": {
          "enum": ["linear", "quad", "cubic", "sin",
            "exp", "circle", "bounce"].reduce(function(acc, e) {
              ["in", "out", "in-out", "out-in"].forEach(function(m) {
                acc.push(e+"-"+m);
              });
              return acc;
          }, [])
        },

        "interactive": {"type": "boolean"},

        "properties": {
          "type": "object",
          "properties": {
            "enter":  {"$ref": "#/defs/propset"},
            "update": {"$ref": "#/defs/propset"},
            "exit":   {"$ref": "#/defs/propset"},
            "hover":  {"$ref": "#/defs/propset"}
          },
          "additionalProperties": false,
          "anyOf": [{"required": ["enter"]}, {"required": ["update"]}]
        }
      },

      // "additionalProperties": false,
      "required": ["type"]
    }
  }
};


text:
package com.google.auto.value.processor;

import com.google.common.base.CharMatcher;

/**
 * Postprocessor that runs over the output of the template engine in order to make it look nicer.
 * Mostly, this involves removing surplus horizontal and vertical space.
 *
 * @author emcmanus@google.com (Éamonn McManus)
 */
class Reformatter {
  /**
   * Characters that might start a continuation line. Since Google Style requires splitting before
   * operators, we expect that a continuation line will begin with one of these (or be inside
   * parentheses). We've omitted {@code /} from this list for now since none of our templates splits
   * before one, and otherwise we'd have to handle {@code //} and {@code /*}.
   */
  private static final CharMatcher OPERATORS = CharMatcher.anyOf("+-*%&|^<>=?:.").precomputed();

  static String fixup(String s) {
    StringBuilder out = new StringBuilder();
    JavaScanner scanner = new JavaScanner(s);
    s = scanner.string();
    int len = s.length();
    for (int start = 0, previous = 0, braces = 0, parens = 0, end = 0;
        start < len;
        previous = start, start = end) {
      end = scanner.tokenEnd(start);
      // The tokenized string always ends with \n so we can usually look at s.charAt(end) without
      // worrying about going past the end of the string.
      switch (s.charAt(start)) {
        case '(':
          parens++;
          break;
        case ')':
          parens--;
          break;
        case '{':
          braces++;
          break;
        case '}':
          braces--;
          break;
        case ' ':
          // This token is a string of consecutive spaces that is not at the start of a line.
          // Consecutive spaces at the start of a line are attached to the previous newline, and
          // we delete spaces at the start of the first line. So we are going to compress this
          // into just one space, and we are going to delete it entirely if it follows '(' or
          // precedes a newline or one of the punctuation characters here.
          if (start > 0 && s.charAt(previous) != '(' && "\n.,;)".indexOf(s.charAt(end)) < 0) {
            out.append(' ');
          }
          continue;
        case '\n':
          // This token is a newline plus any following spaces (the indentation of the next line).
          // If it is followed by something other than a newline then we will output the
          // newline, and replace the following spaces by our computed indentation. Otherwise, the
          // token is part of a sequence of newlines but it is not the last one. If this is a
          // context where we delete blank lines, or if this is not the first new line in the
          // sequence, or if we are at the start of the file, we will delete this one. Otherwise we
          // will output a single newline with no following indentation. Contexts where we delete
          // blank lines are inside parentheses or inside more than one set of braces.
          if (end < len && s.charAt(end) != '\n') {
            // Omit newlines at the very start of the file. Also delete newline+indent between
            // ( and ), since that shows up in some places where we output one parameter per line,
            // when there are no parameters.
            char prev = s.charAt(previous);
            char next = s.charAt(end);
            if (out.length() > 0 && (prev != '(' || next != ')')) {
              out.append('\n');
              // Replace any space after the newline with our computed indentation. The algorithm
              // here is simplistic but works OK for our current templates.
              int indent = braces * 2;
              if (parens > 0 || OPERATORS.matches(next)) {
                indent += 4;
              } else if (next == '}') {
                indent -= 2;
              }
              for (int i = 0; i < indent; i++) {
                out.append(' ');
              }
            }
            continue;
          }
          if (parens == 0 && braces < 2 && s.charAt(previous) != '\n' && out.length() > 0) {
            out.append('\n');
          }
          continue;
        default:
          break;
      }
      out.append(s, start, end);
    }
    return out.toString();
  }

  private Reformatter() {}
}

redpajama_set_name: RedPajamaGithub


text:
var http = require("http");
var Promise = require("bluebird");
var cheerio = require('cheerio');
var request = require('request');

var auth = (function() {

	// Private

    /**
     * @param  {Array} cookies
     * @return {Boolean}
     */
    function isLoginSuccessed(cookies) {
        var isLoggedIn = false;
        for (var i in cookies) {
            if (cookies[i].indexOf('uid') !== -1) {
                isLoggedIn = true;
                break;
            }
        }
        return isLoggedIn;
    }

	// Exposed

    /**
     *  Attempt to login into zamunda.net account. Return Promise which
     *  resolve with cookies array if successed. Reject with JSON object
     *  if not.
     *
     * @param  {JSON} credentials [JSON format: {"username": "name", "password": "secret"}]
     * @return {Promise}
     */
    function login(credentials) {
        if (!credentials || !credentials.username || !credentials.password) {
            var errorMessage = 'Login credentials missing data. Given data: credentials = ' +
                credentials;
            throw new Error(errorMessage);
        }

        var options = {
            url: 'http://www.zamunda.net/takelogin.php',
            method: 'POST',
            form: credentials
        };

        return new Promise(function(resolve, reject) {
            request(options, function(err, res) {
                if (err) throw new Error('Error occured while logging in.');

                var cookies = res.headers['set-cookie'];
                if (isLoginSuccessed(cookies)) {
                    resolve(cookies);
                }
                else {
                    reject({
                        status: 401,
                        messageBG: 'Възникна грешка при логването в замунда акаунта ви. Опитайте отново.'
                    });
                }
            });
        });
    }

	return {
        login: login
	};

}());

module.exports = auth;


text:
package ch.epfl.sweng.swissaffinity.utilities.parsers.user;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

import ch.epfl.sweng.swissaffinity.events.Event;
import ch.epfl.sweng.swissaffinity.users.User;
import ch.epfl.sweng.swissaffinity.utilities.Address;
import ch.epfl.sweng.swissaffinity.utilities.Location;
import ch.epfl.sweng.swissaffinity.utilities.parsers.AddressParser;
import ch.epfl.sweng.swissaffinity.utilities.parsers.DateParser;
import ch.epfl.sweng.swissaffinity.utilities.parsers.LocationParser;
import ch.epfl.sweng.swissaffinity.utilities.parsers.Parser;
import ch.epfl.sweng.swissaffinity.utilities.parsers.ParserException;
import ch.epfl.sweng.swissaffinity.utilities.parsers.ParserFactory;
import ch.epfl.sweng.swissaffinity.utilities.parsers.SafeJSONObject;

import static ch.epfl.sweng.swissaffinity.users.User.Gender;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.ADDRESS;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.BIRTH_DATE;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.EMAIL;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.ENABLED;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.EVENTS_ATTENDED;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.FACEBOOK_ID;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.FIRST_NAME;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.GENDER;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.HOME_PHONE;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.ID;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.LAST_NAME;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.LOCATIONS_INTEREST;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.LOCKED;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.MOBILE_PHONE;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.PROFESSION;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.PROFILE_PICTURE;
import static ch.epfl.sweng.swissaffinity.utilities.network.ServerTags.USERNAME;
import static ch.epfl.sweng.swissaffinity.utilities.parsers.SafeJSONObject.DEFAULT_STRING;

/**
 * A parser for the User class.
 */
public class UserParser extends Parser<User> {

    @Override
    public User parse(SafeJSONObject jsonObject) throws ParserException {

        String facebookId;
        int id;
        String userName;
        SafeJSONObject jsonAddress;
        //Critical attributes
        try {
            facebookId = jsonObject.getString(FACEBOOK_ID.get());
            id = jsonObject.getInt(ID.get());
            userName = jsonObject.getString(USERNAME.get());
            jsonAddress = new SafeJSONObject(jsonObject.get(ADDRESS.get(), new JSONObject()));
        } catch (JSONException e) {
            throw new ParserException(e);
        }

        String email = jsonObject.get(EMAIL.get(), DEFAULT_STRING);
        String firstName = jsonObject.get(FIRST_NAME.get(), DEFAULT_STRING);
        String lastName = jsonObject.get(LAST_NAME.get(), DEFAULT_STRING);
        String mobilePhone = jsonObject.get(MOBILE_PHONE.get(), DEFAULT_STRING);
        String homePhone = jsonObject.get(HOME_PHONE.get(), DEFAULT_STRING);
        Address address = new AddressParser().parse(jsonAddress);
        boolean locked = jsonObject.get(LOCKED.get(), true);
        boolean enabled = jsonObject.get(ENABLED.get(), false);
        Gender gender = Gender.getGender(jsonObject.get(GENDER.get(), "male"));
        String birthDate = jsonObject.get(BIRTH_DATE.get(), DEFAULT_STRING);
        String profession = jsonObject.get(PROFESSION.get(), DEFAULT_STRING);
        String profilePicture = jsonObject.get(PROFILE_PICTURE.get(), DEFAULT_STRING);

        List<Location> areasOfInterest = new ArrayList<>();
        JSONArray areas = jsonObject.get(LOCATIONS_INTEREST.get(), new JSONArray());
        for (int i = 0; i < areas.length(); i++) {
            try {
                JSONObject jsonArea = areas.getJSONObject(i);
                Location location = new LocationParser().parse(new SafeJSONObject(jsonArea));
                areasOfInterest.add(location);
            } catch (JSONException e) {
                throw new ParserException(e);
            }
        }

        List<Event> eventsAttended = new ArrayList<>();
        JSONArray events = jsonObject.get(EVENTS_ATTENDED.get(), new JSONArray());
        for (int i = 0; i < events.length(); i++) {
            try {
                SafeJSONObject jsonEvent = new SafeJSONObject(events.getJSONObject(i));
                Parser<? extends Event> parser = ParserFactory.parserFor(jsonEvent);
                Event event = parser.parse(jsonEvent);
                eventsAttended.add(event);
            } catch (JSONException e) {
                throw new ParserException(e);
            }
        }

        return new User(
                id,
                facebookId,
                userName,
                email,
                lastName,
                firstName,
                mobilePhone,
                homePhone,
                address,
                locked,
                enabled,
                gender,
                DateParser.parseFromString(birthDate, DateParser.SERVER_DATE_FORMAT),
                profession,
                profilePicture,
                areasOfInterest,
                eventsAttended);
    }
}


text:
<demo-template [description]="description" [demoSources]="demoSources">

        正常
        <jigsaw-textarea #myTextarea width="400px" height="100px" [(value)]="textareaValue" placeholder="basic demo">
        </jigsaw-textarea>

            输入值是:{{ textareaValue }}

        禁用
        <jigsaw-textarea [disabled]="true"></jigsaw-textarea>

        校验
        <jigsaw-textarea #textarea [valid]="textarea.value.length > 2" placeholder="输入至少3个字符"> </jigsaw-textarea>

</demo-template>


text:
    deployed and running in server
    package org.jboss.da.test.server.*

## Client side

    running in maven process
    package org.jboss.da.test.client.*


text:
from six.moves.urllib import parse as urlparse

from mod_pywebsocket import common, msgutil, util
from mod_pywebsocket.handshake import hybi

def web_socket_do_extra_handshake(request):
    url_parts = urlparse.urlsplit(request.uri)
    msg = b'HTTP/1.1 101 Switching Protocols:\x0D\x0AConnection: Upgrade\x0D\x0AUpgrade: WebSocket\x0D\x0ASet-Cookie: ws_test_'
    msg += url_parts.query.encode() or b''
    msg += b'=test; Path=/\x0D\x0ASec-WebSocket-Origin: '
    msg += request.ws_origin.encode()
    msg += b'\x0D\x0ASec-WebSocket-Accept: '
    msg += hybi.compute_accept_from_unicode(request.headers_in.get(common.SEC_WEBSOCKET_KEY_HEADER))
    msg += b'\x0D\x0A\x0D\x0A'
    request.connection.write(msg)
    return

def web_socket_transfer_data(request):
    while True:
        return


text:
package gov.hhs.onc.dcdt.format.impl;

import gov.hhs.onc.dcdt.beans.impl.AbstractToolBean;
import gov.hhs.onc.dcdt.convert.utils.ToolConversionUtils;
import gov.hhs.onc.dcdt.convert.utils.ToolConversionUtils.IsAssignableConvertiblePredicate;
import gov.hhs.onc.dcdt.format.ToolFormatter;
import gov.hhs.onc.dcdt.format.ToolFormatterRegistrar;
import gov.hhs.onc.dcdt.utils.ToolClassUtils;
import java.text.ParseException;
import java.util.HashSet;
import java.util.Set;
import javax.annotation.Nullable;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.converter.ConditionalGenericConverter;
import org.springframework.format.FormatterRegistry;

public class ToolFormatterRegistrarImpl extends AbstractToolBean implements ToolFormatterRegistrar {
    private static class ToolFormatterConverter<T> implements ConditionalGenericConverter {
        protected ToolFormatter<T> formatter;
        protected Class<T> formattedClass;
        protected ConvertiblePair parseConvType;
        protected ConvertiblePair printConvType;
        protected Set<ConvertiblePair> convTypes = new HashSet<>(2);

        public ToolFormatterConverter(ToolFormatter<T> formatter) {
            this.formatter = formatter;
            this.formattedClass = this.formatter.getFormattedClass();
            this.parseConvType = new ConvertiblePair(String.class, this.formattedClass);
            this.printConvType = new ConvertiblePair(this.formattedClass, String.class);

            if (this.formatter.canParse()) {
                this.convTypes.add(this.parseConvType);
            }

            if (this.formatter.canPrint()) {
                this.convTypes.add(this.printConvType);
            }
        }

        @Nullable
        @Override
        public Object convert(@Nullable Object src, TypeDescriptor srcType, TypeDescriptor targetType) {
            Object target = null;

            if (ToolConversionUtils.isAssignable(srcType, targetType, this.parseConvType)) {
                try {
                    target = this.formatter.parse(((String) src));
                } catch (ParseException e) {
                    throw new IllegalArgumentException(String.format("Unable to convert parseable source string to target object (class=%s): %s",
                        ToolClassUtils.getName(this.formattedClass), src), e);
                }
            } else if (ToolConversionUtils.isAssignable(srcType, targetType, this.printConvType)) {
                target = this.formatter.print(this.formattedClass.cast(src));
            }

            return target;
        }

        @Override
        public boolean matches(TypeDescriptor srcType, TypeDescriptor targetType) {
            return CollectionUtils.exists(this.convTypes, new IsAssignableConvertiblePredicate(srcType, targetType));
        }

        @Override
        public Set<ConvertiblePair> getConvertibleTypes() {
            return this.convTypes;
        }
    }

    private Set<ToolFormatter<?>> formatters;

    public ToolFormatterRegistrarImpl(Set<ToolFormatter<?>> formatters) {
        this.formatters = formatters;
    }

    @Override
    public void registerFormatters(FormatterRegistry formatterReg) {
        for (ToolFormatter<?> formatter : this.formatters) {
            formatterReg.addConverter(new ToolFormatterConverter<>(formatter));
        }
    }

    @Override
    public Set<ToolFormatter<?>> getFormatters() {
        return this.formatters;
    }
}


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

package com.azure.resourcemanager.batchai.models;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/** Resource collection API of Workspaces. */
public interface Workspaces {
    /**
     * Gets a list of Workspaces associated with the given subscription.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a list of Workspaces associated with the given subscription.
     */
    PagedIterable<Workspace> list();

    /**
     * Gets a list of Workspaces associated with the given subscription.
     *
     * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a list of Workspaces associated with the given subscription.
     */
    PagedIterable<Workspace> list(Integer maxResults, Context context);

    /**
     * Gets a list of Workspaces within the specified resource group.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a list of Workspaces within the specified resource group.
     */
    PagedIterable<Workspace> listByResourceGroup(String resourceGroupName);

    /**
     * Gets a list of Workspaces within the specified resource group.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a list of Workspaces within the specified resource group.
     */
    PagedIterable<Workspace> listByResourceGroup(String resourceGroupName, Integer maxResults, Context context);

    /**
     * Deletes a Workspace.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deleteByResourceGroup(String resourceGroupName, String workspaceName);

    /**
     * Deletes a Workspace.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void delete(String resourceGroupName, String workspaceName, Context context);

    /**
     * Gets information about a Workspace.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return information about a Workspace.
     */
    Workspace getByResourceGroup(String resourceGroupName, String workspaceName);

    /**
     * Gets information about a Workspace.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return information about a Workspace.
     */
    Response<Workspace> getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context);

    /**
     * Gets information about a Workspace.
     *
     * @param id the resource ID.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return information about a Workspace.
     */
    Workspace getById(String id);

    /**
     * Gets information about a Workspace.
     *
     * @param id the resource ID.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return information about a Workspace.
     */
    Response<Workspace> getByIdWithResponse(String id, Context context);

    /**
     * Deletes a Workspace.
     *
     * @param id the resource ID.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deleteById(String id);

    /**
     * Deletes a Workspace.
     *
     * @param id the resource ID.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deleteByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new Workspace resource.
     *
     * @param name resource name.
     * @return the first stage of the new Workspace definition.
     */
    Workspace.DefinitionStages.Blank define(String name);
}