// Path: fiat-core/src/main/java/com/netflix/spinnaker/fiat/model/Authorization.java
// public enum Authorization {
//   READ,
//   WRITE,
//   EXECUTE,
//   CREATE;
// 
//   public static final Set<Authorization> ALL =
//       Collections.unmodifiableSet(EnumSet.allOf(Authorization.class));
// }


import static java.util.function.Function.identity;
import static java.util.stream.Collectors.toMap;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.netflix.spinnaker.fiat.model.Authorization;
import java.util.*;
import java.util.stream.Collectors;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.val;
/*
 * Copyright 2017 Netflix, 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.
 */

package com.netflix.spinnaker.fiat.model.resources;



/**
 * Representation of authorization configuration for a resource. This object is immutable, which
 * makes it challenging when working with Jackson's {@code ObjectMapper} and Spring's
 * {@code @ConfigurationProperties}. The {@link Builder} is a helper class for the latter use case.
 */
@ToString
@EqualsAndHashCode
public class Permissions {

  public static final Permissions EMPTY = Builder.fromMap(Collections.emptyMap());

// Path: fiat-core/src/main/java/com/netflix/spinnaker/fiat/model/Authorization.java
// public enum Authorization {
//   READ,
//   WRITE,
//   EXECUTE,
//   CREATE;
// 
//   public static final Set<Authorization> ALL =
//       Collections.unmodifiableSet(EnumSet.allOf(Authorization.class));
// }


// Path: fiat-core/src/main/java/com/netflix/spinnaker/fiat/model/resources/Permissions.java
import static java.util.function.Function.identity;
import static java.util.stream.Collectors.toMap;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.netflix.spinnaker.fiat.model.Authorization;
import java.util.*;
import java.util.stream.Collectors;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.val;

/*
 * Copyright 2017 Netflix, 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.
 */

package com.netflix.spinnaker.fiat.model.resources;



/**
 * Representation of authorization configuration for a resource. This object is immutable, which
 * makes it challenging when working with Jackson's {@code ObjectMapper} and Spring's
 * {@code @ConfigurationProperties}. The {@link Builder} is a helper class for the latter use case.
 */
@ToString
@EqualsAndHashCode
public class Permissions {

  public static final Permissions EMPTY = Builder.fromMap(Collections.emptyMap());

  private final Map<Authorization, List<String>> permissions;