// 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 com.netflix.spinnaker.fiat.model.Authorization;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
/*
 * Copyright 2017 Google, 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;


@Slf4j
public abstract class BaseAccessControlled<R extends BaseAccessControlled>
    implements Resource.AccessControlled {

  public abstract R setPermissions(Permissions p);

  /**
   * Legacy holdover where setting `requiredGroupMembership` implied both read and write
   * permissions.
   */
// 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/BaseAccessControlled.java
import com.netflix.spinnaker.fiat.model.Authorization;
import java.util.List;
import lombok.extern.slf4j.Slf4j;

/*
 * Copyright 2017 Google, 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;


@Slf4j
public abstract class BaseAccessControlled<R extends BaseAccessControlled>
    implements Resource.AccessControlled {

  public abstract R setPermissions(Permissions p);

  /**
   * Legacy holdover where setting `requiredGroupMembership` implied both read and write
   * permissions.
   */
  @SuppressWarnings("unchecked")